Add New Report FrontAccounting

In this case, we will create a report in Purchases Module with name Supplier Invoice Transactions. Output for this report is summary of supplier invoice in the period of date. Let’s begin, firstly open file “\reporting\reports_main” and add code below to create report menu.

//Add by : Andik
$reports->addReport(RC_SUPPLIER, 211, _('Supplier Invoice &Transactions'),
 array(_('Start Date') => 'DATEBEGIN',
 _('End Date') => 'DATEENDM',
 _('Supplier') => 'SUPPLIERS_NO_FILTER',
 _('Orientation') => 'ORIENTATION',
 _('Destination') => 'DESTINATION'));
//end

and this is the result. Continue reading “Add New Report FrontAccounting”

Advertisements

Create New Inquiry FrontAccounting

Base on article Add Menu on “Items and Inventory” Module FrontAccounting, we want to create inquiry for that menu. Firstly create query, open file “\inventory\includes\db\items_locations_db.inc”, then add below code.

//Add by : Andik
function get_loc_details_all($description)
{
 $sql = "SELECT stock.loc_code, stock.location_name,
 reorders.stock_id, reorders.reorder_level, item.description
 FROM ".TB_PREF."locations stock"
 ." INNER JOIN ".TB_PREF."loc_stock reorders ON reorders.loc_code=stock.loc_code"
 ." INNER JOIN ".TB_PREF."stock_master item ON item.stock_id=reorders.stock_id"
 ." WHERE stock.fixed_asset = 0 and item.mb_flag <> 'D'"
 ." and item.description like " .db_escape("%" . $description . "%")
 ." ORDER BY reorders.stock_id, reorders.loc_code";
 return db_query($sql,"an item reorder could not be retreived");
}
//end

After this, create new file on directory “inventory\inquiry” and name it “stock_onhand.php” and then add code below. Continue reading “Create New Inquiry FrontAccounting”

Change Default Account on Input Work Order Additional Costs FrontAccounting

Base on article Add Parameters on “System and General GL Setup” FrontAccounting, we also want to implement it into “Work Order Additional Costs” process. This is the way, open file “\manufacturing\work_order_costs.php”, then find code below.

$item = get_item($wo_details['stock_id']);
$r = get_default_bank_account(get_company_pref('curr_default'));
$_POST['cr_acc'] = $r[0];
$_POST['costs'] = price_format(get_post('PaymentType')==WO_OVERHEAD ? $item['overhead_cost'] : $item['labour_cost']);

Then, modified like code below. Continue reading “Change Default Account on Input Work Order Additional Costs FrontAccounting”

Change Default Account on Create Work Order FrontAccounting

Base on article Add Parameters on “System and General GL Setup” FrontAccounting we want to implement it into “Create Work Order” form. This is the way, open file “\manufacturing\work_order_entry.php”, then find code below.

if (!isset($_POST['Labour']) || list_updated('stock_id') || list_updated('type'))
{
     $bank_act = get_default_bank_account();
     $item = get_item(get_post('stock_id'));
     $_POST['Labour'] = price_format(get_post('type') == WO_ASSEMBLY ? $item['labour_cost'] : 0);
     $_POST['cr_lab_acc'] = $bank_act['account_code'];
     $_POST['Costs'] = price_format(get_post('type') == WO_ASSEMBLY ? $item['overhead_cost'] : 0);
     $_POST['cr_acc'] = $bank_act['account_code'];
     $Ajax->activate('_page_body');
 }

Then, modified like code below. Continue reading “Change Default Account on Create Work Order FrontAccounting”

Powered by WordPress.com.

Up ↑