$n = $myrow["id"];
label_cell(get_trans_view_str(ST_SUPPRECEIVE, $myrow["grn_batch_id"]), "nowrap align='right'");
- hidden('qty_recd'.$n, $myrow["qty_recd"]);
- hidden('item_code'.$n, $myrow["item_code"]);
- hidden('item_description'.$n, $myrow["description"]);
- hidden('prev_quantity_inv'.$n, $myrow['quantity_inv']);
- hidden('order_price'.$n, $myrow['unit_price']);
- hidden('po_detail_item'.$n, $myrow['po_detail_item']);
label_cell(get_trans_view_str(ST_PURCHORDER, $myrow["purch_order_no"]), "nowrap align='right'");
label_cell($myrow["item_code"]);
label_cell($myrow["description"]);
{
$date = Today();
}
- if ($trans->terms['day_in_following_month'])
+ if ($trans->terms['type'] == PTT_FOLLOWING)
{ /*Its a day in the following month when due */
$trans->due_date =
- add_days(end_month($date), $trans->terms["day_in_following_month"]);
+ add_days(end_month($date), $trans->terms["days"]);
}
else
{ /*Use the Days Before Due to add to the invoice date */
- $trans->due_date = add_days($date, $trans->terms["days_before_due"]);
+ $trans->due_date = add_days($date, $trans->terms["days"]);
}
}