X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fcustomer_invoice.php;h=180a80370aa80a88afa4baa815d94d8256b8a0bb;hb=c8eeb951abdae4922e8472449b6956974d92049a;hp=c4ef21f14f155942d7d682b7fcea2cf082c09ba5;hpb=c356acfd88575bc518efdb9fb77e0a6b6c645eec;p=fa-stable.git diff --git a/sales/customer_invoice.php b/sales/customer_invoice.php index c4ef21f1..180a8037 100644 --- a/sales/customer_invoice.php +++ b/sales/customer_invoice.php @@ -56,8 +56,8 @@ if (isset($_GET['AddedID'])) { display_note(get_customer_trans_view_str($trans_type, $invoice_no, _("&View This Invoice")), 0, 1); - display_note(print_document_link($invoice_no, _("&Print This Invoice"), true, ST_SALESINVOICE)); - display_note(print_document_link($invoice_no, _("&Email This Invoice"), true, ST_SALESINVOICE, false, "printlink", "", 1),1); + display_note(print_document_link($invoice_no."-".$trans_type, _("&Print This Invoice"), true, ST_SALESINVOICE)); + display_note(print_document_link($invoice_no."-".$trans_type, _("&Email This Invoice"), true, ST_SALESINVOICE, false, "printlink", "", 1),1); display_note(get_gl_view_str($trans_type, $invoice_no, _("View the GL &Journal Entries for this Invoice")),1); @@ -68,12 +68,14 @@ if (isset($_GET['AddedID'])) { } elseif (isset($_GET['UpdatedID'])) { $invoice_no = $_GET['UpdatedID']; + $trans_type = ST_SALESINVOICE; display_notification_centered(sprintf(_('Sales Invoice # %d has been updated.'),$invoice_no)); display_note(get_trans_view_str(ST_SALESINVOICE, $invoice_no, _("&View This Invoice"))); echo '
'; - display_note(print_document_link($invoice_no, _("&Print This Invoice"), true, ST_SALESINVOICE)); + display_note(print_document_link($invoice_no."-".$trans_type, _("&Print This Invoice"), true, ST_SALESINVOICE)); + display_note(print_document_link($invoice_no."-".$trans_type, _("&Email This Invoice"), true, ST_SALESINVOICE, false, "printlink", "", 1),1); hyperlink_no_params($path_to_root . "/sales/inquiry/customer_inquiry.php", _("Select Another &Invoice to Modify")); @@ -128,7 +130,7 @@ if ( (isset($_GET['DeliveryNumber']) && ($_GET['DeliveryNumber'] > 0) ) } elseif (isset($_GET['ModifyInvoice']) && $_GET['ModifyInvoice'] > 0) { - if ( get_parent_trans(ST_SALESINVOICE, $_GET['ModifyInvoice']) == 0) { // 1.xx compatibility hack + if ( get_sales_parent_numbers(ST_SALESINVOICE, $_GET['ModifyInvoice']) == 0) { // 1.xx compatibility hack echo"

" . _("There are no delivery notes for this invoice.
Most likely this invoice was created in Front Accounting version prior to 2.0 and therefore can not be modified.") . "
"; @@ -226,8 +228,10 @@ function copy_to_cart() $cart->freight_cost = input_num('ChargeFreightCost'); $cart->document_date = $_POST['InvoiceDate']; $cart->due_date = $_POST['due_date']; - $cart->payment = $_POST['payment']; - $cart->payment_terms = get_payment_terms($_POST['payment']); + if ($cart->pos != -1) { + $cart->payment = $_POST['payment']; + $cart->payment_terms = get_payment_terms($_POST['payment']); + } $cart->Comments = $_POST['Comments']; if ($_SESSION['Items']->trans_no == 0) $cart->reference = $_POST['ref']; @@ -358,9 +362,17 @@ hidden('cart_id'); start_table(TABLESTYLE2, "width=80%", 5); start_row(); +$colspan = 1; +$dim = get_company_pref('use_dimension'); +if ($dim > 0) + $colspan = 3; label_cells(_("Customer"), $_SESSION['Items']->customer_name, "class='tableheader2'"); label_cells(_("Branch"), get_branch_name($_SESSION['Items']->Branch), "class='tableheader2'"); -label_cells(_("Currency"), $_SESSION['Items']->customer_currency, "class='tableheader2'"); +if ($_SESSION['Items']->pos != -1) // editable payment type + label_cells(_("Payment terms:"), sale_payment_list('payment'), "class='tableheader2'", "colspan=$colspan"); +else + label_cells(_('Payment:'), $_SESSION['Items']->payment_terms['terms'], "class='tableheader2'", "colspan=$colspan"); + end_row(); start_row(); @@ -375,10 +387,10 @@ if ($_SESSION['Items']->trans_no == 0) { label_cells(_("Sales Type"), $_SESSION['Items']->sales_type_name, "class='tableheader2'"); -if ($_SESSION['Items']->pos != -1) // editable payment type - label_cells(_("Payment terms:"), sale_payment_list('payment'), "class='tableheader2'"); -else - label_cells(_('Payment:'), $_SESSION['Items']->payment_terms['terms'], "class='tableheader2'"); +label_cells(_("Currency"), $_SESSION['Items']->customer_currency, "class='tableheader2'"); +// 2010-09-03 Joe Hunt +if ($dim > 0) + label_cells(_("Dimension"), get_dimension_string($_SESSION['Items']->dimension_id), "class='tableheader2'"); end_row(); start_row(); @@ -404,6 +416,10 @@ if (!isset($_POST['due_date']) || !is_date($_POST['due_date'])) { } date_cells(_("Due Date"), 'due_date', '', null, 0, 0, 0, "class='tableheader2'"); +if ($dim > 1) + label_cells(_("Dimension"). " 2", get_dimension_string($_SESSION['Items']->dimension2_id), "class='tableheader2'"); +else if ($dim > 0) + label_cell(" ", "colspan=2"); end_row(); end_table();