phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/inc/class.soXport.inc.php, 1.10


From: nomail
Subject: [Phpgroupware-cvs] property/inc/class.soXport.inc.php, 1.10
Date: Wed, 15 Sep 2004 21:51:09 +0200

Update of /property/inc
Modified Files:
        Branch: 
          class.soXport.inc.php

date: 2004/09/15 19:51:09;  author: sigurdne;  state: Exp;  lines: +59 -2

Log Message:
no message
=====================================================================
Index: property/inc/class.soXport.inc.php
diff -u property/inc/class.soXport.inc.php:1.9 
property/inc/class.soXport.inc.php:1.10
--- property/inc/class.soXport.inc.php:1.9      Wed Sep 15 07:53:24 2004
+++ property/inc/class.soXport.inc.php  Wed Sep 15 19:51:09 2004
@@ -46,7 +46,61 @@
                        $this->db->next_record();
 
                        return $this->db->f('tax_code');
+               }
+
+               function tax_b_account_override($mvakode='',$b_account_id='')
+               {
+                       if(!$b_account_id)
+                       {
+                               return $mvakode;
+                       }
+                       $sql = "select mva as tax_code from fm_b_account where 
id='$b_account_id'";
+                       $this->db->query($sql);
+                       $this->db->next_record();
+
+                       if($this->db->f('tax_code'))
+                       {
+                               return $this->db->f('tax_code');
+                       }
+                       else
+                       {
+                               return $mvakode;
+                       }
+
+               }
+
+               function tax_vendor_override($mvakode='',$vendor_id='')
+               {
+                       if(!$vendor_id)
+                       {
+                               return $mvakode;
+                       }
+                       $sql = "select mva as tax_code from fm_vendor where 
id='$vendor_id'";
+                       $this->db->query($sql);
+                       $this->db->next_record();
+
+                       if($this->db->f('tax_code'))
+                       {
+                               return $this->db->f('tax_code');
+                       }
+                       else
+                       {
+                               return $mvakode;
+                       }
+
+               }
+
+               function get_kostra_id($dima='')
+               {
+                       if(!$dima)
+                       {
+                               return;
+                       }
+                       $sql = "select kostra_id from fm_location1 where loc1=" 
. substr($dima,0,4);
+                       $this->db->query($sql);
+                       $this->db->next_record();
 
+                       return $this->db->f('kostra_id');
                }
 
                function anleggsnr_to_objekt($anleggsnr)
@@ -139,6 +193,7 @@
                                {
                                        $values= array(
                                                $fields['project_id'],
+                                               $fields['kostra_id'],
                                                $fields['pmwrkord_code'],
                                                $fields['bilagsnr'],
                                                $fields['splitt'],
@@ -172,7 +227,7 @@
 
                                        $values = 
$this->bocommon->validate_db_insert($values);
 
-                                       $sql= "INSERT INTO fm_ecobilag 
(project_id,pmwrkord_code,bilagsnr,splitt,kildeid,kidnr,typeid,fakturadato,"
+                                       $sql= "INSERT INTO fm_ecobilag 
(project_id,kostra_id,pmwrkord_code,bilagsnr,splitt,kildeid,kidnr,typeid,fakturadato,"
                                        . " 
forfallsdato,regtid,artid,spvend_code,dimb,oppsynsmannid,saksbehandlerid,budsjettansvarligid,"
                                        . " 
fakturanr,spbudact_code,loc1,dima,dimd,mvakode,periode,merknad,oppsynsigndato,saksigndato,"
                                        . " 
budsjettsigndato,utbetalingsigndato,belop,godkjentbelop)"
@@ -200,6 +255,7 @@
                                $data['typeid'],
                                $data['kildeid'],
                                $data['project_id'],
+                               $data['kostra_id'],
                                $data['pmwrkord_code'],
                                $data['fakturadato'],
                                $data['periode'],
@@ -230,7 +286,7 @@
 
                        $values = $this->bocommon->validate_db_insert($values);
 
-                       $sql="INSERT INTO fm_ecobilagoverf 
(id,bilagsnr,kidnr,typeid,kildeid,project_id,pmwrkord_code,fakturadato,"
+                       $sql="INSERT INTO fm_ecobilagoverf 
(id,bilagsnr,kidnr,typeid,kildeid,project_id,kostra_id,pmwrkord_code,fakturadato,"
                                . " 
periode,forfallsdato,fakturanr,spbudact_code,regtid,artid,spvend_code,dima,loc1,"
                                . " 
dimb,mvakode,dimd,oppsynsmannid,saksbehandlerid,budsjettansvarligid,oppsynsigndato,saksigndato,"
                                . " 
budsjettsigndato,merknad,splitt,utbetalingid,utbetalingsigndato,filnavn,overftid,"
@@ -370,6 +426,7 @@
                                $underbilag[$i]['mvakode']      = 
$this->db->f('mvakode');
                                $underbilag[$i]['dimd'] = $this->db->f('dimd');
                                $underbilag[$i]['project_id']   = 
$this->db->f('project_id');
+                               $underbilag[$i]['kostra_id']    = 
$this->db->f('kostra_id');
                                if($this->db->f('oppsynsmannid'))
                                {
                                        $underbilag[$i]['oppsynsmannid']        
= $this->db->f('oppsynsmannid');




reply via email to

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