X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=purchasing%2Fsupplier_invoice.php;h=15a6529f1667438d4cb72d32503b4779ac153ef6;hb=2cb57633d2f3e27b0c2b2e7448564f467e21e1fd;hp=33c745a1c60c453ba577bc92b6871da328d25718;hpb=80dd97a37f674cc3691fa04af4c29607067566b2;p=fa-stable.git
diff --git a/purchasing/supplier_invoice.php b/purchasing/supplier_invoice.php
index 33c745a1..15a6529f 100644
--- a/purchasing/supplier_invoice.php
+++ b/purchasing/supplier_invoice.php
@@ -36,7 +36,7 @@ check_db_has_suppliers(_("There are no suppliers defined in the system."));
if (isset($_GET['AddedID']))
{
$invoice_no = $_GET['AddedID'];
- $trans_type = 20;
+ $trans_type = ST_SUPPINVOICE;
echo "
";
@@ -153,7 +153,7 @@ function check_data()
return false;
}
- if (!is_new_reference($_SESSION['supp_trans']->reference, 20))
+ if (!is_new_reference($_SESSION['supp_trans']->reference, ST_SUPPINVOICE))
{
display_error(_("The entered reference is already in use."));
set_focus('reference');
@@ -359,7 +359,7 @@ if ($_SESSION["wa_current_user"]->can_access('SA_GRNDELETE'))
update_average_material_cost($grn["supplier_id"], $myrow["item_code"],
$myrow["unit_price"], -$myrow["QtyOstdg"], Today());
- add_stock_move(25, $myrow["item_code"], $myrow['grn_batch_id'], $grn['loc_code'], sql2date($grn["delivery_date"]), "",
+ add_stock_move(ST_SUPPRECEIVE, $myrow["item_code"], $myrow['grn_batch_id'], $grn['loc_code'], sql2date($grn["delivery_date"]), "",
-$myrow["QtyOstdg"], $myrow['std_cost_unit'], $grn["supplier_id"], 1, $myrow['unit_price']);
commit_transaction();