<div class="erp-ac-receive-payment-table"><?php include dirname(dirname(__FILE__)) . '/common/transaction-table.php'; ?> </div> <?php include dirname(dirname(__FILE__)) . '/common/memo.php'; ?> <input type="hidden" name="field_id" value="0"> <input type="hidden" name="status" value="closed"> <input type="hidden" name="type" value="sales"> <input type="hidden" name="form_type" value="payment"> <input type="hidden" name="page" value="erp-accounting-sales"> <input type="hidden" name="erp-action" value="ac-new-sales-payment"> <?php wp_nonce_field('erp-ac-trans-new'); ?> <?php submit_button(__('Receive Payment', 'erp-accounting'), 'primary', 'submit_erp_ac_trans'); ?> </form> <div class="erp-ac-receive-payment-table-clone" style="display: none;"> <?php $dropdown = erp_ac_get_chart_dropdown(['exclude' => [1, 2, 3], 'required' => true, 'name' => 'line_account[]', 'class' => 'erp-ac-selece-custom']); include dirname(dirname(__FILE__)) . '/common/transaction-table.php'; ?> </div> </div>
<?php $account = isset($_GET['spend_money']) && $_GET['spend_money'] == 'true' ? true : false; $account_id = $account && isset($_GET['bank']) ? intval($_GET['bank']) : false; ?> <div class="wrap erp-ac-form-wrap"> <h2><?php _e('Payment Voucher', 'erp-accounting'); ?> </h2> <?php $selected_account_id = isset($_GET['account_id']) ? intval($_GET['account_id']) : 0; $dropdown = erp_ac_get_chart_dropdown(['exclude' => [1, 4, 5], 'required' => true, 'name' => 'line_account[]']); ?> <form action="" method="post" class="erp-form" style="margin-top: 30px;"> <ul class="form-fields block" style="width:50%;"> <li> <ul class="erp-form-fields two-col block"> <li class="erp-form-field"> <?php erp_html_form_input(array('label' => __('Vendor', 'erp-accounting'), 'name' => 'user_id', 'type' => 'select', 'class' => 'select2', 'options' => ['' => __('— Select —', 'erp-accounting')] + erp_get_peoples_array(['type' => 'vendor', 'number' => 100]), 'custom_attr' => ['data-placeholder' => __('Select a payee', 'erp-accounting')])); ?> </li> <li class="cols erp-form-field"> <?php erp_html_form_input(array('label' => __('From Account', 'erp-accounting'), 'name' => 'account_id', 'placeholder' => __('Select an Account', 'erp-accounting'), 'type' => 'select', 'class' => 'select2', 'value' => $account_id ? $account_id : $selected_account_id, 'options' => ['' => __('— Select —', 'erp-accounting')] + erp_ac_get_bank_dropdown()));
_e('Debit', 'erp-accounting'); ?> </th> <th class="col-amount"><?php _e('Credit', 'erp-accounting'); ?> </th> <th class="col-action"> </th> </tr> </thead> <tbody> <tr> <td class="col-chart"> <?php echo erp_ac_get_chart_dropdown(['required' => true, 'name' => 'line_account[]']); ?> </td> <td class="col-desc"> <?php erp_html_form_input(array('name' => 'line_desc[]', 'type' => 'text')); ?> </td> <td class="col-amount"> <?php erp_html_form_input(array('name' => 'line_debit[]', 'type' => 'number', 'class' => 'line_debit', 'placeholder' => '0.00')); ?> </td> <td class="col-amount"> <?php erp_html_form_input(array('name' => 'line_credit[]', 'type' => 'number', 'class' => 'line_credit', 'placeholder' => '0.00'));