From: Joe Hunt Date: Fri, 31 Dec 2010 11:44:22 +0000 (+0000) Subject: Changed so supplier credit note items shows the invoice price/not grn price X-Git-Tag: 2.3-final~836 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=68f6db3c4ec27c4b1be8fe548fbca4ec56442606;p=fa-stable.git Changed so supplier credit note items shows the invoice price/not grn price --- diff --git a/purchasing/includes/ui/invoice_ui.inc b/purchasing/includes/ui/invoice_ui.inc index 41ae4b3b..dd2d8ed6 100644 --- a/purchasing/includes/ui/invoice_ui.inc +++ b/purchasing/includes/ui/invoice_ui.inc @@ -377,11 +377,16 @@ function display_grn_items_for_selection(&$supp_trans, $k) qty_cells(null, 'This_QuantityCredited'.$n, number_format2(max($myrow["quantity_inv"], 0), $dec), null, null, $dec); $dec2 = 0; - amount_cells(null, 'ChgPrice'.$n, price_decimal_format($myrow["unit_price"], $dec2), null, null, $dec2); if ($supp_trans->trans_type == ST_SUPPINVOICE) + { + amount_cells(null, 'ChgPrice'.$n, price_decimal_format($myrow["unit_price"], $dec2), null, null, $dec2); amount_cell(round2($myrow["unit_price"] * ($myrow["qty_recd"] - $myrow["quantity_inv"]), user_price_dec())); - else - amount_cell(round2($myrow["unit_price"] * max($myrow['quantity_inv'], 0), user_price_dec())); + } + else + { + amount_cells(null, 'ChgPrice'.$n, price_decimal_format($myrow["act_price"], $dec2), null, null, $dec2); + amount_cell(round2($myrow["act_price"] * max($myrow['quantity_inv'], 0), user_price_dec())); + } if ($supp_trans->trans_type == ST_SUPPINVOICE) submit_cells('grn_item_id'.$n, _("Add"), '', _("Add to Invoice"), true); else