X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Finquiry%2Fcustomer_inquiry.php;h=ebd55aeac424127a454b89d6c0c779854aed2250;hb=bfbaa838e7ecc10e60da4f894ec0d2fffb7d1938;hp=8632c83704bc46c8c55788321045940099216079;hpb=c09be0dad6b05131e240349a375af7a4b7bf3444;p=fa-stable.git diff --git a/sales/inquiry/customer_inquiry.php b/sales/inquiry/customer_inquiry.php index 8632c837..ebd55aea 100644 --- a/sales/inquiry/customer_inquiry.php +++ b/sales/inquiry/customer_inquiry.php @@ -215,22 +215,28 @@ if (db_num_rows($result) == 0) // only allow crediting if it's not been totally allocated if ($myrow["TotalAmount"] - $myrow["Allocated"] > 0) $credit_me_str = "" . _("Credit This") . ""; - $edit_page= $path_to_root.'/sales/customer_invoice.php?ModifyInvoice=' + if (get_voided_entry(10, $myrow["trans_no"]) === false && $myrow['Allocated'] == 0) // 2008-11-19 Joe Hunt + $edit_page= $path_to_root.'/sales/customer_invoice.php?ModifyInvoice=' . $myrow['trans_no']; break; case 11: - if ($myrow['order_']==0) // free-hand credit note - $edit_page= $path_to_root.'/sales/credit_note_entry.php?ModifyCredit=' + if (get_voided_entry(11, $myrow["trans_no"]) === false && $myrow['Allocated'] == 0) // 2008-11-19 Joe Hunt + { + if ($myrow['order_']==0) // free-hand credit note + $edit_page= $path_to_root.'/sales/credit_note_entry.php?ModifyCredit=' . $myrow['trans_no']; - else // credit invoice - $edit_page= $path_to_root.'/sales/customer_credit_invoice.php?ModifyCredit=' + else // credit invoice + $edit_page= $path_to_root.'/sales/customer_credit_invoice.php?ModifyCredit=' . $myrow['trans_no']; + } break; case 13: - $edit_page= $path_to_root.'/sales/customer_delivery.php?ModifyDelivery=' - . $myrow['trans_no']; break; + if (get_voided_entry(13, $myrow["trans_no"]) === false) + $edit_page= $path_to_root.'/sales/customer_delivery.php?ModifyDelivery=' + . $myrow['trans_no']; + break; } $date = sql2date($myrow["tran_date"]);