X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fcustomer_invoice.php;fp=sales%2Fcustomer_invoice.php;h=ea4898790220e87230b9257d5de5d362a34a1027;hb=be99f1e63f8e27c2c5db75f93cd9956eb2239a03;hp=b249948559332441319a3085620f5c5e09e20e90;hpb=8d564a2cbca92c71738d933813ac4985e15488e4;p=fa-stable.git diff --git a/sales/customer_invoice.php b/sales/customer_invoice.php index b2499485..ea489879 100644 --- a/sales/customer_invoice.php +++ b/sales/customer_invoice.php @@ -63,6 +63,15 @@ if (isset($_GET['AddedID'])) { hyperlink_params("$path_to_root/sales/inquiry/sales_deliveries_view.php", _("Select Another &Delivery For Invoicing"), "OutstandingOnly=1"); + $sql = "SELECT trans_type_from, trans_no_from FROM ".TB_PREF."cust_allocations + WHERE trans_type_to=".ST_SALESINVOICE." AND trans_no_to=".db_escape($invoice_no); + $result = db_query($sql, "could not retrieve customer allocation"); + $row = db_fetch($result); + + if ($row === false) + hyperlink_params("$path_to_root/sales/customer_payments.php", _("Entry &customer payment for this invoice"), + "SInvoice=".$invoice_no); + hyperlink_params("$path_to_root/admin/attachments.php", _("Add an Attachment"), "filterType=$trans_type&trans_no=$invoice_no"); display_footer_exit();