X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fcustomer_invoice.php;h=ea4898790220e87230b9257d5de5d362a34a1027;hb=84ebe8b3ebc1fc3e6508d75a4f39ce4a868b0b14;hp=b249948559332441319a3085620f5c5e09e20e90;hpb=acbb281bf6915bfccd6798b12eae1fd7d60f63c6;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();