[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [11463] property: visualize wrong vendor
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [11463] property: visualize wrong vendor |
Date: |
Thu, 14 Nov 2013 13:40:30 +0000 |
Revision: 11463
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11463
Author: sigurdne
Date: 2013-11-14 13:40:30 +0000 (Thu, 14 Nov 2013)
Log Message:
-----------
property: visualize wrong vendor
Modified Paths:
--------------
trunk/property/inc/class.boinvoice.inc.php
Modified: trunk/property/inc/class.boinvoice.inc.php
===================================================================
--- trunk/property/inc/class.boinvoice.inc.php 2013-11-14 12:31:36 UTC (rev
11462)
+++ trunk/property/inc/class.boinvoice.inc.php 2013-11-14 13:40:30 UTC (rev
11463)
@@ -204,7 +204,43 @@
function read_single_line($line_id)
{
- return $this->so->read_single_voucher(0, $line_id);
+
+ $invoice = $this->so->read_single_voucher(0, $line_id);
+
+ $soXport = CreateObject('property.soXport');
+ $soworkorder = CreateObject('property.soworkorder');
+ $sos_agreement = CreateObject('property.sos_agreement');
+ foreach ( $invoice as & $entry )
+ {
+ if( $entry['order_id'] )
+ {
+ if($order_type =
$soXport->check_order($entry['order_id']))
+ {
+ if($order_type == 'workorder')
+ {
+ $workorder =
$soworkorder->read_single($entry['order_id']);
+
+
if($workorder['vendor_id'] && ($workorder['vendor_id'] != $entry['vendor_id']))
+ {
+ //
$entry['vendor'] = $this->get_vendor_name($workorder['vendor_id']) . '
=> ' . $entry['vendor'];
+
$entry['vendor'] = $workorder['vendor_id'] . ' ['
.$this->get_vendor_name($workorder['vendor_id']) . "] => {$entry['vendor_id']}
[{$entry['vendor']}]";
+ }
+ }
+
+ if($order_type == 's_agreement')
+ {
+ $s_agreement =
$sos_agreement->read_single($entry['order_id']);
+
+
if($s_agreement['vendor_id'] && ($s_agreement['vendor_id'] !=
$entry['vendor_id']))
+ {
+
$entry['vendor'] = $s_agreement['vendor_id'] . ' ['
.$this->get_vendor_name($s_agreement['vendor_id']) . "] =>
{$entry['vendor_id']} [{$entry['vendor']}]";
+ }
+ }
+ }
+ }
+ }
+
+ return $invoice;
}
function
read_consume($start_date='',$end_date='',$vendor_id='',$loc1='',$workorder_id='',$b_account_class='',$district_id='',$ecodimb
= '')
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [11463] property: visualize wrong vendor,
Sigurd Nes <=