check_db_has_suppliers(_("There are no suppliers defined in the system."));
if (isset($_GET['ModifyCredit']))
- check_is_closed(ST_SUPPINVOICE, $_GET['ModifyCredit']);
+ check_is_editable(ST_SUPPINVOICE, $_GET['ModifyCredit']);
//---------------------------------------------------------------------------------------------------
if (is_inventory_item($item->item_code))
{
$qoh = get_qoh_on_date($item->item_code, null, $_SESSION['supp_trans']->tran_date);
- if ($item->qty_recd > $qoh)
+ if ($item->this_quantity_inv > $qoh)
{
$stock = get_item($item->item_code);
display_error(_("The return cannot be processed because there is an insufficient quantity for item:") .