X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=purchasing%2Fsupplier_invoice.php;h=03fc1c33e6270b1f2cceb76f110f58394fe08374;hb=f1e793b356fd4d526eafc66073302e584ede78a7;hp=b78505180184a76b7ccdae60e3a6dd62299e5e64;hpb=bf00f0e16df5974ecba17b59be8bc660bdf6b8a8;p=fa-stable.git diff --git a/purchasing/supplier_invoice.php b/purchasing/supplier_invoice.php index b7850518..03fc1c33 100644 --- a/purchasing/supplier_invoice.php +++ b/purchasing/supplier_invoice.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $page_security=5; $path_to_root=".."; @@ -325,20 +334,11 @@ if ($id4 != -1) $Ajax->activate('inv_tot'); } +$id2 = -1; if ($_SESSION["wa_current_user"]->access == 2) { - $id3 = find_submit('void_item_id'); - if ($id3 != -1) - { - $js = "if(confirm(\"" - .sprintf(_('You are about to remove all yet non-invoiced items from delivery line #%d. This operation also irreversibly changes related order line. Do you want to continue ?'), $id3) - ."\")) { - JsHttpRequest.request(\"void_confirm".$id3."\"); - }"; - $Ajax->addScript(true,$js); - } - $id2 = find_submit('void_confirm'); - if ($id2 != -1) // Added section 2008-10-18 Joe Hunt for voiding delivery lines + $id2 = find_submit('void_item_id'); + if ($id2 != -1) { begin_transaction(); @@ -366,39 +366,36 @@ if ($_SESSION["wa_current_user"]->access == 2) } } -start_form(false, true); - -start_table("$table_style2 width=98%", 8); -echo ""; // outer table +if (isset($_POST['go'])) +{ + $Ajax->activate('gl_items'); + display_quick_entries($_SESSION['supp_trans'], $_POST['qid'], input_num('totamount'), QE_SUPPINV); + $_POST['totamount'] = price_format(0); $Ajax->activate('totamount'); + $Ajax->activate('inv_tot'); +} -echo "
"; +start_form(); invoice_header($_SESSION['supp_trans']); + if ($_POST['supplier_id']=='') display_error('No supplier found for entered search text'); else { - echo ""; // outer table - - echo "
"; + start_outer_table("$table_style2 width=98%", 5); display_grn_items($_SESSION['supp_trans'], 1); - //display_grn_items_for_selection(); + display_gl_items($_SESSION['supp_trans'], 1); - //display_gl_controls(); - //echo ""; // outer table - echo "
"; div_start('inv_tot'); invoice_totals($_SESSION['supp_trans']); div_end(); -} -echo ""; -end_table(); // outer table + end_outer_table(0, false); +} //----------------------------------------------------------------------------------------- - if ($id != -1 || $id2 != -1) { $Ajax->activate('grn_items'); @@ -408,9 +405,9 @@ if ($id != -1 || $id2 != -1) if (get_post('AddGLCodeToTrans')) $Ajax->activate('inv_tot'); -echo "
"; -submit_center('PostInvoice', _("Enter Invoice"), true, '', true); -echo "
"; +br(); +submit_center('PostInvoice', _("Enter Invoice"), true, '', 'default'); +br(); end_form();