[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [16163] nlsh hardcoded tax values
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [16163] nlsh hardcoded tax values |
Date: |
Mon, 16 Jan 2017 03:31:13 -0500 (EST) |
Revision: 16163
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16163
Author: sigurdne
Date: 2017-01-16 03:31:12 -0500 (Mon, 16 Jan 2017)
Log Message:
-----------
nlsh hardcoded tax values
Modified Paths:
--------------
trunk/property/inc/class.uiinvoice2.inc.php
trunk/property/js/portico/ajax_invoice.js
Modified: trunk/property/inc/class.uiinvoice2.inc.php
===================================================================
--- trunk/property/inc/class.uiinvoice2.inc.php 2017-01-15 18:16:39 UTC (rev
16162)
+++ trunk/property/inc/class.uiinvoice2.inc.php 2017-01-16 08:31:12 UTC (rev
16163)
@@ -734,11 +734,43 @@
$sign_orig = '';
$my_initials =
$GLOBALS['phpgw_info']['user']['account_lid'];
+ $default_tax_code = 22;
+
if (count($voucher))
{
//---------start forward
+ //temporary hardcoded for NLSH
+ switch ($voucher[0]['b_account_id'])
+ {
+ case '5900':
+ case '5930':
+ case '6300':
+ case '6420':
+ case '6490':
+ case '6840':
+ case '6841':
+ case '7040':
+ case '7140':
+ case '7149':
+ case '7400':
+ case '7500':
+ case '7710':
+ case '7794':
+ $default_tax_code = 0;
+ break;
+ case '4100':
+ $default_tax_code = 23;
+ break;
+
+ default:
+ $default_tax_code = 22;
+ break;
+ }
+
+ $selected_tax_code =
!empty($voucher[0]['tax_code']) ? $voucher[0]['tax_code'] : $default_tax_code;
+
if
(isset($this->config->config_data['invoice_acl']) &&
$this->config->config_data['invoice_acl'] == 'dimb')
{
$janitor_list =
$this->bo->get_dimb_role_user(1, $voucher[0]['dim_b'],
isset($voucher[0]['janitor']) ? $voucher[0]['janitor'] : '');
@@ -850,7 +882,7 @@
$voucher_info['generic']['approved_amount'] =
number_format($voucher_info['generic']['approved_amount'], 2, ',', ' ');
$voucher_info['generic']['amount'] =
number_format($voucher_info['generic']['amount'], 2, ',', ' ');
$voucher_info['generic']['dimb_list']['options'] =
$this->bo->select_dimb_list($voucher[0]['dim_b']);
-
$voucher_info['generic']['tax_code_list']['options'] =
$this->bo->tax_code_list($voucher[0]['tax_code']);
+
$voucher_info['generic']['tax_code_list']['options'] =
$this->bo->tax_code_list($selected_tax_code);
$voucher_info['generic']['periodization_list']['options'] =
execMethod('property.bogeneric.get_list', array(
'type' => 'periodization', 'selected'
=> $voucher[0]['periodization']));
@@ -890,7 +922,7 @@
else
{
$voucher_info['generic']['dimb_list']['options'] =
$this->bo->select_dimb_list();
-
$voucher_info['generic']['tax_code_list']['options'] =
$this->bo->tax_code_list();
+
$voucher_info['generic']['tax_code_list']['options'] =
$this->bo->tax_code_list($default_tax_code);
$voucher_info['generic']['periodization_list']['options'] =
execMethod('property.bogeneric.get_list', array(
'type' => 'periodization'));
Modified: trunk/property/js/portico/ajax_invoice.js
===================================================================
--- trunk/property/js/portico/ajax_invoice.js 2017-01-15 18:16:39 UTC (rev
16162)
+++ trunk/property/js/portico/ajax_invoice.js 2017-01-16 08:31:12 UTC (rev
16163)
@@ -504,7 +504,7 @@
$.each(obj, function (i)
{
var selected = '';
- if (obj[i].id ==
voucher[0].tax_code)
+ if (obj[i].id ==
voucher[0].tax_code || obj[i].selected)
{
selected = ' selected';
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [16163] nlsh hardcoded tax values,
sigurdne <=