fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [9583] property: invoice


From: Sigurd Nes
Subject: [Fmsystem-commits] [9583] property: invoice
Date: Wed, 13 Jun 2012 17:28:34 +0000

Revision: 9583
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9583
Author:   sigurdne
Date:     2012-06-13 17:28:33 +0000 (Wed, 13 Jun 2012)
Log Message:
-----------
property: invoice

Modified Paths:
--------------
    trunk/property/inc/class.soinvoice.inc.php

Modified: trunk/property/inc/class.soinvoice.inc.php
===================================================================
--- trunk/property/inc/class.soinvoice.inc.php  2012-06-13 13:33:21 UTC (rev 
9582)
+++ trunk/property/inc/class.soinvoice.inc.php  2012-06-13 17:28:33 UTC (rev 
9583)
@@ -916,7 +916,6 @@
 
                        $this->db->transaction_begin();
 
-                       // Approval applies to all lines within voucher
                        if( $values['approve'] != $values['sign_orig'] )
                        {
                                switch ( $values['sign_orig'] )
@@ -948,12 +947,22 @@
                                                break;
                                }
 
-                               $sql ="SELECT bilagsnr FROM {$table} WHERE id= 
{$id}";
-                               $this->db->query($sql,__LINE__,__FILE__);
-                               $this->db->next_record();
-                               $bilagsnr = (int)$this->db->f('bilagsnr');
-                               $value_set      = 
$this->db->validate_update($value_set);
-                               $this->db->query("UPDATE {$table} SET 
$value_set WHERE bilagsnr= {$bilagsnr}" ,__LINE__,__FILE__);
+       //                      $sql ="SELECT bilagsnr FROM {$table} WHERE id= 
{$id}";
+       //                      $this->db->query($sql,__LINE__,__FILE__);
+       //                      $this->db->next_record();
+       //                      $bilagsnr = (int)$this->db->f('bilagsnr');
+       //                      $value_set      = 
$this->db->validate_update($value_set);
+       //                      $this->db->query("UPDATE {$table} SET 
$value_set WHERE bilagsnr= {$bilagsnr}" ,__LINE__,__FILE__);
+                               
+                               if(isset($value_set['budsjettansvarligid']) && 
!$value_set['budsjettansvarligid'])
+                               {
+                                       phpgwapi_cache::message_set( 'Mangler 
anviser','error');
+                               }
+                               else
+                               {
+                                       $value_set      = 
$this->db->validate_update($value_set);
+                                       $this->db->query("UPDATE {$table} SET 
$value_set WHERE id= {$id}" ,__LINE__,__FILE__);
+                               }
                        }
 
                        $value_set = array
@@ -1959,16 +1968,21 @@
                                        }
                                }
 
-                               $value_set      = 
$this->db->validate_update($value_set);
-                               return $this->db->query("UPDATE fm_ecobilag SET 
$value_set {$condition}",__LINE__,__FILE__);
+                               if(isset($value_set['budsjettansvarligid']) && 
!$value_set['budsjettansvarligid'])
+                               {
+                                       phpgwapi_cache::message_set( 'Mangler 
anviser','error');
+                               }
+                               else
+                               {
+                                       $value_set      = 
$this->db->validate_update($value_set);
+                                       return $this->db->query("UPDATE 
fm_ecobilag SET $value_set {$condition}",__LINE__,__FILE__);
+                               }
                        }
 
                        return false;
                }
 
 
-
-
                function get_order_info($order_id)
                {
                        $order_info = array();




reply via email to

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