X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=purchasing%2Fsupplier_credit.php;h=bd2fb08ae0ae717a2640f051bfa20b8660a21f59;hb=7e8c90ee7e898a9181f62f387ccb92158f47f59c;hp=625b9e4d9192c64003385e31ac23b7deb018d7f0;hpb=e8ae3516539a520338117f25d401c0fc234973a4;p=fa-stable.git diff --git a/purchasing/supplier_credit.php b/purchasing/supplier_credit.php index 625b9e4d..bd2fb08a 100644 --- a/purchasing/supplier_credit.php +++ b/purchasing/supplier_credit.php @@ -32,18 +32,6 @@ page(_("Supplier Credit Note"), false, false, "", $js); check_db_has_suppliers(_("There are no suppliers defined in the system.")); -//--------------------------------------------------------------------------------------------------------------- -if ($ret = context_restore()) { - // return from supplier editor - copy_from_trans($_SESSION['supp_trans']); - if(isset($ret['supplier_id'])) - $_POST['supplier_id'] = $ret['supplier_id']; -} -if (isset($_POST['_supplier_id_editor'])) { - copy_to_trans($_SESSION['supp_trans']); - context_call($path_to_root.'/purchasing/manage/suppliers.php?supplier_id='.$_POST['supplier_id'], 'supp_trans'); -} - //--------------------------------------------------------------------------------------------------------------- if (isset($_GET['AddedID'])) @@ -130,6 +118,12 @@ if (isset($_POST['AddGLCodeToTrans'])){ } } + if (!is_tax_gl_unique(get_post('gl_code'))) { + display_error(_("Cannot post to GL account used by more than one tax type.")); + set_focus('gl_code'); + $input_error = true; + } + if ($input_error == false) { $_SESSION['supp_trans']->add_gl_codes_to_trans($_POST['gl_code'], $gl_act_name, @@ -348,7 +342,7 @@ if (get_post('AddGLCodeToTrans')) $Ajax->activate('inv_tot'); br(); -submit_center('PostCreditNote', _("Enter Credit Note"), true, '', true); +submit_center('PostCreditNote', _("Enter Credit Note"), true, '', 'default'); br(); end_form();