set_focus('past_due_days');
return false;
}
+
+ $grn_act = get_company_pref('grn_clearing_act');
+ if (get_post('grn_clearing_act') != $grn_act && db_num_rows(get_grn_items(0, '', true)))
+ {
+ display_error(_("Before GRN Clearing Account can be changed all GRNs have to be invoiced"));
+ $_POST['grn_clearing_act'] = $grn_act;
+ set_focus('grn_clearing_account');
+ return false;
+ }
return true;
}
'default_prompt_payment_act', 'default_inventory_act', 'default_cogs_act',
'default_adj_act', 'default_inv_sales_act', 'default_assembly_act', 'legal_text',
'past_due_days', 'default_workorder_required', 'default_dim_required',
- 'default_delivery_required',
+ 'default_delivery_required', 'grn_clearing_act', 'tax_algorithm',
'allow_negative_stock'=> 0, 'accumulate_shipping'=> 0,
'po_over_receive' => 0.0, 'po_over_charge' => 0.0, 'default_credit_limit'=>0.0
)));
start_form();
-//start_outer_table("class='tablestyle'");
-start_outer_table($table_style2, 5);
+start_outer_table(TABLESTYLE2);
table_section(1);
$_POST['exchange_diff_act'] = $myrow["exchange_diff_act"];
$_POST['bank_charge_act'] = $myrow["bank_charge_act"];
+$_POST['tax_algorithm'] = $myrow["tax_algorithm"];
$_POST['default_sales_act'] = $myrow["default_sales_act"];
$_POST['default_sales_discount_act'] = $myrow["default_sales_discount_act"];
$_POST['default_prompt_payment_act'] = $myrow["default_prompt_payment_act"];
$_POST['po_over_charge'] = percent_format($myrow['po_over_charge']);
$_POST['past_due_days'] = $myrow['past_due_days'];
+$_POST['grn_clearing_act'] = $myrow['grn_clearing_act'];
+
$_POST['default_credit_limit'] = $myrow['default_credit_limit'];
$_POST['legal_text'] = $myrow['legal_text'];
$_POST['accumulate_shipping'] = $myrow['accumulate_shipping'];
gl_all_accounts_list_row(_("Bank Charges Account:"), 'bank_charge_act', $_POST['bank_charge_act']);
+tax_algorithm_list_row(_("Tax Algorithm:"), 'tax_algorithm', $_POST['tax_algorithm']);
+
//---------------
table_section_title(_("Customers and Sales"));
gl_all_accounts_list_row(_("Purchase Discount Account:"), 'pyt_discount_act', $_POST['pyt_discount_act']);
+gl_all_accounts_list_row(_("GRN Clearing Account:"), 'grn_clearing_act', get_post('grn_clearing_act'), true, false, _("No postings on GRN"));
+
table_section_title(_("Inventory"));
check_row(_("Allow Negative Inventory:"), 'allow_negative_stock', null);
-label_row(null, _("Warning: Checking this will result in incorrect values in General Ledger"), "", "class='stockmankofg' colspan=2");
+label_row(null, _("Warning: This may cause a delay in GL postings"), "", "class='stockmankofg' colspan=2");
table_section_title(_("Items Defaults"));
gl_all_accounts_list_row(_("Sales Account:"), 'default_inv_sales_act', $_POST['default_inv_sales_act']);