Skip to content

Commit

Permalink
PPFrt and MO Non Field DB Data added to header of Purchase Order Entr…
Browse files Browse the repository at this point in the history
…y Form.

This mod needs backported reporting.inc file.
This is on top of the previous edit description fix (2014-12-31) in the same file.
1cb957b
  • Loading branch information
apmuthu committed Jan 9, 2015
1 parent 5c031fe commit 3fb2102
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions FAMods/CHANGELOG_apmuthu.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

2015-01-09 Ap.Muthu PPFrt and MO (Min Order from Supplier for Free Freight) Non Field DB Data added to header of Purchase Order Entry Form
2015-01-08 Ap.Muthu Mod for Print Preparer in the Sales Quotation report ($print_preparer flag set in company overriding doctext.inc if used)
2015-01-08 Ap.Muthu PPFrt and MO (Min Order from Supplier for Free Freight) Non Field DB Data added to header of Purchase Order report in company 0 mods
2015-01-08 Ap.Muthu Backported Customer Data Entry form fix to stay in newly added / updated page
Expand Down
11 changes: 9 additions & 2 deletions FAMods/purchasing/includes/ui/po_ui.inc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
***********************************************************************/
include_once($path_to_root . "/purchasing/includes/purchasing_db.inc");
include_once($path_to_root . "/reporting/includes/reporting.inc");

//--------------------------------------------------------------------------------------------------

Expand Down Expand Up @@ -57,7 +58,7 @@ function get_supplier_details_to_order(&$order, $supplier_id)
{
$sql = "SELECT curr_code, supp_name, tax_group_id, supp.tax_included,
supp.credit_limit - Sum(IFNULL(ov_amount + ov_gst + ov_discount,0)) as cur_credit,
terms.terms, terms.days_before_due, terms.day_in_following_month
terms.terms, terms.days_before_due, terms.day_in_following_month, supp.notes AS supp_notes
FROM ".TB_PREF."suppliers supp
LEFT JOIN ".TB_PREF."supp_trans trans ON supp.supplier_id = trans.supplier_id
LEFT JOIN ".TB_PREF."payment_terms terms ON supp.payment_terms=terms.terms_indicator
Expand All @@ -80,6 +81,9 @@ function get_supplier_details_to_order(&$order, $supplier_id)

$order->set_supplier($supplier_id, $myrow["supp_name"], $myrow["curr_code"],
$myrow["tax_group_id"], $myrow["tax_included"]);

$supp_notes = parse_notes_params($myrow["supp_notes"]);
return $supp_notes;
}

//---------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -134,7 +138,7 @@ function display_po_header(&$order)

if ($order->supplier_id != get_post('supplier_id',-1)) {
$old_supp = $order->supplier_id;
get_supplier_details_to_order($order, $_POST['supplier_id']);
$supp_notes=get_supplier_details_to_order($order, $_POST['supplier_id']);
get_duedate_from_terms($order);
$_POST['due_date'] = $order->due_date;

Expand Down Expand Up @@ -189,6 +193,9 @@ function display_po_header(&$order)
text_row(_("Supplier's Reference:"), 'supp_ref', null, 16, 15);
locations_list_row(_("Receive Into:"), 'StkLocation', null, false, true);

if (@$supp_notes['MO']) label_row(_("Min. Order:"), $supp_notes['MO']);
if (@$supp_notes['PPFrt']) label_row(_("PrePaid Frt:"), $supp_notes['PPFrt']);

table_section(3);

if (!isset($_POST['StkLocation']) || $_POST['StkLocation'] == "" ||
Expand Down

1 comment on commit 3fb2102

@apmuthu
Copy link
Owner Author

@apmuthu apmuthu commented on 3fb2102 Jan 9, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

po_with_supplier_notes_info_tp

Please sign in to comment.