+ $edit_page='';
+ $due_date_str = '';
+ $credit_me_str = '';
+
+ switch($myrow['type']) {
+ case 10:
+ $due_date_str = sql2date($myrow["due_date"]);
+ /*Show a link to allow an invoice to be credited */
+ // 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='
+ . $myrow['trans_no'];
+ break;
+ case 13:
+ $edit_page= $path_to_root.'/sales/customer_delivery.php?ModifyDelivery='
+ . $myrow['trans_no']; break;
+ }
+