X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep302.php;h=47bf8448c8c2212dd4cb1d255ed30cb14fef7539;hb=cf015790b7363cfcf29b98c82d20787c8d703fc1;hp=ba7703cc6c16c1109f068099a6a9b3c07ac51948;hpb=7a50c189ea995d5fe6785feb7710c00396065d2b;p=fa-stable.git diff --git a/reporting/rep302.php b/reporting/rep302.php index ba7703cc..47bf8448 100644 --- a/reporting/rep302.php +++ b/reporting/rep302.php @@ -123,7 +123,7 @@ function getPeriods($stockid, $location) FROM ".TB_PREF."stock_moves WHERE stock_id='$stockid' AND loc_code ='$location' - AND (type=10 OR type=11) + AND (type=13 OR type=11) AND visible=1"; $TransResult = db_query($sql,"No transactions were returned"); @@ -142,8 +142,6 @@ function print_inventory_planning() $location = $_POST['PARAM_1']; $comments = $_POST['PARAM_2']; - $dec = user_qty_dec(); - if ($category == reserved_words::get_all_numeric()) $category = 0; if ($category == 0) @@ -160,11 +158,11 @@ function print_inventory_planning() $cols = array(0, 50, 150, 180, 210, 240, 270, 300, 330, 390, 435, 480, 525); - $per0 = strftime('%b',mktime(0,0,0,date('m'),date('d'),date('Y'))); - $per1 = strftime('%b',mktime(0,0,0,date('m')-1,date('d'),date('Y'))); - $per2 = strftime('%b',mktime(0,0,0,date('m')-2,date('d'),date('Y'))); - $per3 = strftime('%b',mktime(0,0,0,date('m')-3,date('d'),date('Y'))); - $per4 = strftime('%b',mktime(0,0,0,date('m')-4,date('d'),date('Y'))); + $per0 = strftime('%b',mktime(0,0,0,date('m'),1,date('Y'))); + $per1 = strftime('%b',mktime(0,0,0,date('m')-1,1,date('Y'))); + $per2 = strftime('%b',mktime(0,0,0,date('m')-2,1,date('Y'))); + $per3 = strftime('%b',mktime(0,0,0,date('m')-3,1,date('Y'))); + $per4 = strftime('%b',mktime(0,0,0,date('m')-4,1,date('Y'))); $headers = array(_('Category'), '', $per4, $per3, $per2, $per1, $per0, '3*M', _('QOH'), _('Cust Ord'), _('Supp Ord'), _('Sugg Ord')); @@ -204,6 +202,7 @@ function print_inventory_planning() $suppqty = getSuppQty($trans['stock_id'], $trans['loc_code']); $period = getPeriods($trans['stock_id'], $trans['loc_code']); $rep->NewLine(); + $dec = get_qty_dec($trans['stock_id']); $rep->TextCol(0, 1, $trans['stock_id']); $rep->TextCol(1, 2, $trans['description']); $rep->TextCol(2, 3, number_format2($period['prd0'], $dec));