fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [16162] tax_code


From: sigurdne
Subject: [Fmsystem-commits] [16162] tax_code
Date: Sun, 15 Jan 2017 13:16:39 -0500 (EST)

Revision: 16162
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16162
Author:   sigurdne
Date:     2017-01-15 13:16:39 -0500 (Sun, 15 Jan 2017)
Log Message:
-----------
tax_code

Modified Paths:
--------------
    branches/Version-1_0-branch/property/inc/class.uiinvoice2.inc.php
    branches/Version-1_0-branch/property/inc/export/default/Agresso_X114
    branches/Version-1_0-branch/property/js/portico/ajax_invoice.js

Modified: branches/Version-1_0-branch/property/inc/class.uiinvoice2.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiinvoice2.inc.php   
2017-01-13 21:22:10 UTC (rev 16161)
+++ branches/Version-1_0-branch/property/inc/class.uiinvoice2.inc.php   
2017-01-15 18:16:39 UTC (rev 16162)
@@ -787,11 +787,19 @@
                        $sign_orig = '';
                        $my_initials = 
$GLOBALS['phpgw_info']['user']['account_lid'];
 
+                       $default_tax_code = 22;
+
                        if(count($voucher))
                        {
 
 //---------start forward
+//                             if(!empty($voucher[0]['b_account_id']) && 
$voucher[0]['b_account_id'] = '4100')
+//                             {
+//                                     $default_tax_code = 22;
+//                             }
 
+                               $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']:'');
@@ -902,7 +910,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'] ));
 
 
@@ -942,7 +950,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'));
 
                                $approved_list[] = array

Modified: branches/Version-1_0-branch/property/inc/export/default/Agresso_X114
===================================================================
--- branches/Version-1_0-branch/property/inc/export/default/Agresso_X114        
2017-01-13 21:22:10 UTC (rev 16161)
+++ branches/Version-1_0-branch/property/inc/export/default/Agresso_X114        
2017-01-15 18:16:39 UTC (rev 16162)
@@ -893,7 +893,7 @@
                                        'ACCOUNTLINK.CODE'              => 
$line['spbudact_code'], // 4180
                                        'CURRENCY'                              
=> $line['currency'],
                                        'AMOUNT'                                
=> $amount, // 312500
-                                       'TAXCODE'                               
=> $line['mvakode'],
+                                       'TAXCODE'                               
=> !empty($line['mvakode']) ? $line['mvakode'] : 22,
                                        'APPROVER.FULLNAME'             => 
$line['budsjettansvarligid'], //Batch 04 - 14
                                        'DIMENSION.D1.CODE'             => 
$line['dimb'], // 1111
                                        'DIMENSION.D2.CODE'             => 
'',//$line['dima'], // 62000
@@ -944,7 +944,7 @@
                                        'ACCOUNTLINK.CODE'              => 
$reskontroart,
                                        'CURRENCY'                              
=> $oRsBilag[0]['currency'],
                                        'AMOUNT'                                
=> (-1 * $sum_amount),
-                                       'TAXCODE'                               
=> $oRsBilag[0]['mvakode'],
+                                       'TAXCODE'                               
=> !empty($oRsBilag[0]['mvakode']) ? $oRsBilag[0]['mvakode'] : 22,
                                        'APPROVER.FULLNAME'             => '',
                                        'DIMENSION.D1.CODE'             => '',
                                        'DIMENSION.D2.CODE'             => '',

Modified: branches/Version-1_0-branch/property/js/portico/ajax_invoice.js
===================================================================
--- branches/Version-1_0-branch/property/js/portico/ajax_invoice.js     
2017-01-13 21:22:10 UTC (rev 16161)
+++ branches/Version-1_0-branch/property/js/portico/ajax_invoice.js     
2017-01-15 18:16:39 UTC (rev 16162)
@@ -481,7 +481,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';
                                                }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]