X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fcustomer_payments.php;h=907f789eca8499fd7dd1e9014fe0be406779c6b4;hb=75564761d1429129282bd04ab00575c5e80fe4c2;hp=366386add98cbaa17a20282d2db8c7264f19d2a9;hpb=3148667b6bdaf9859ebbf1a8a9ce0e35591e38bd;p=fa-stable.git diff --git a/sales/customer_payments.php b/sales/customer_payments.php index 366386ad..907f789e 100644 --- a/sales/customer_payments.php +++ b/sales/customer_payments.php @@ -102,6 +102,7 @@ if (isset($_GET['AddedID'])) { display_notification_centered(_("The customer payment has been successfully entered.")); submenu_print(_("&Print This Receipt"), ST_CUSTPAYMENT, $payment_no."-".ST_CUSTPAYMENT, 'prtopt'); + submenu_print(_("&Email This Receipt"), ST_CUSTPAYMENT, $payment_no."-".ST_CUSTPAYMENT, null, 1); submenu_view(_("&View this Customer Payment"), ST_CUSTPAYMENT, $payment_no); @@ -174,7 +175,7 @@ function can_process() return false; } - if (isset($_POST['charge']) && !check_num('charge', 0)) { + if (isset($_POST['charge']) && (!check_num('charge', 0) || $_POST['charge'] == $_POST['amount'])) { display_error(_("The entered amount is invalid or negative and cannot be processed.")); set_focus('charge'); return false; @@ -243,6 +244,7 @@ if (get_post('AddPaymentItem') && can_process()) { input_num('amount'), input_num('discount'), $_POST['memo_'], 0, input_num('charge'), input_num('bank_amount', input_num('amount'))); $_SESSION['alloc']->trans_no = $payment_no; + $_SESSION['alloc']->date_ = $_POST['DateBanked']; $_SESSION['alloc']->write(); unset($_SESSION['alloc']);