! -> Note
$ -> Affected files
+28-Oct-2008 Joe Hunt
+# [000009] Delivery Note/Sales Invoice should not be editable after it has been voided.
+$ /admin/db/voiding_db.inc
+ /sales/inquiry/sales_deliveries_view.php
+ /sales/inquiry/customer_inquiry.php
+
27-Oct-2008 Joe Hunt
! [0000078] Opened Exchange rate for editing (without storing) in sales/purchasing module payment
# Fixed exchange rate display bugs in Supplier Payment (earlier dates).
$delivery = get_customer_trans($type_no, $type);
if ($delivery['trans_link'] != 0)
{
- $inv = get_customer_trans($delivery['trans_link'], 10);
- if ($inv['ov_amount'] != 0 || $inv['ov_discount'] != 0 || $inv['ov_gst'] != 0 ||
- $inv['ov_freight'] != 0 || $inv['ov_freight_tax'] != 0 || $inv['alloc'] != 0)
+ if (get_voided_entry(10, $delivery['trans_link']) === false)
return false;
}
}
// only allow crediting if it's not been totally allocated
if ($myrow["TotalAmount"] - $myrow["Allocated"] > 0)
$credit_me_str = "<a href='$path_to_root/sales/customer_credit_invoice.php?InvoiceNumber=" . $myrow["trans_no"] . "'>" . _("Credit This") . "</a>";
- $edit_page= $path_to_root.'/sales/customer_invoice.php?ModifyInvoice='
+ if (get_voided_entry(10, $myrow["trans_no"]) === false)
+ $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)
+ {
+ 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"]);
{
$modify_page = $path_to_root . "/sales/customer_delivery.php?" . SID . "ModifyDelivery=" . $myrow["trans_no"];
$invoice_page = $path_to_root . "/sales/customer_invoice.php?" . SID . "DeliveryNumber=" .$myrow["trans_no"];
- label_cell("<a href='$modify_page'>" . _("Edit") . "</a>");
+ if (get_voided_entry(13, $myrow["trans_no"]) === false)
+ label_cell("<a href='$modify_page'>" . _("Edit") . "</a>");
+ else
+ label_cell("");
label_cell(print_document_link($myrow['trans_no'], _("Print")));
label_cell($not_closed ? "<a href='$invoice_page'>" . _("Invoice") . "</a>" : '');