fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [8888] Property: filter invoice id for paid invoice


From: Sigurd Nes
Subject: [Fmsystem-commits] [8888] Property: filter invoice id for paid invoice
Date: Thu, 16 Feb 2012 09:30:54 +0000

Revision: 8888
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8888
Author:   sigurdne
Date:     2012-02-16 09:30:54 +0000 (Thu, 16 Feb 2012)
Log Message:
-----------
Property: filter invoice id for paid invoice

Modified Paths:
--------------
    trunk/property/inc/class.boinvoice.inc.php
    trunk/property/inc/class.soinvoice.inc.php
    trunk/property/inc/class.uiinvoice.inc.php
    trunk/property/js/yahoo/invoice.paid.index.js

Modified: trunk/property/inc/class.boinvoice.inc.php
===================================================================
--- trunk/property/inc/class.boinvoice.inc.php  2012-02-16 08:59:16 UTC (rev 
8887)
+++ trunk/property/inc/class.boinvoice.inc.php  2012-02-16 09:30:54 UTC (rev 
8888)
@@ -127,7 +127,7 @@
                        $this->district_id              = 
isset($data['district_id'])?$data['district_id']:'';
                }
 
-               function 
read_invoice($paid='',$start_date='',$end_date='',$vendor_id='',$loc1='',$workorder_id='',$voucher_id=0)
+               function 
read_invoice($paid='',$start_date='',$end_date='',$vendor_id='',$loc1='',$workorder_id='',$voucher_id=0,
 $invoice_id = '')
                {
                        if(!phpgw::get_var('paid', 'bool'))
                        {
@@ -142,7 +142,7 @@
                                
'start_date'=>$start_date,'end_date'=>$end_date,'vendor_id'=>$vendor_id,
                                
'loc1'=>$loc1,'workorder_id'=>$workorder_id,'allrows'=>$this->allrows,
                                'voucher_id'=>$voucher_id,'b_account_class' 
=>$this->b_account_class,
-                               'district_id' => $this->district_id));
+                               'district_id' => $this->district_id, 
'invoice_id' => $invoice_id));
 
                        $soXport    = CreateObject('property.soXport');
                        $soworkorder = CreateObject('property.soworkorder');

Modified: trunk/property/inc/class.soinvoice.inc.php
===================================================================
--- trunk/property/inc/class.soinvoice.inc.php  2012-02-16 08:59:16 UTC (rev 
8887)
+++ trunk/property/inc/class.soinvoice.inc.php  2012-02-16 09:30:54 UTC (rev 
8888)
@@ -81,6 +81,7 @@
                        $voucher_id     = 
isset($data['voucher_id'])?$data['voucher_id']:'';
                        $b_account_class= 
isset($data['b_account_class'])?$data['b_account_class']:'';
                        $district_id    = 
isset($data['district_id'])?$data['district_id']:'';
+                       $invoice_id             = $data['invoice_id'] ? 
$data['invoice_id'] :'';
 
                        $join_tables    = '';
                        $filtermethod   = '';
@@ -131,15 +132,21 @@
 
                        if ($vendor_id)
                        {
-                               $filtermethod .= " $where  spvend_code 
='$vendor_id' ";
+                               $filtermethod .= " $where  spvend_code 
='{$vendor_id}' ";
                                $where= 'AND';
                        }
                        if ($loc1)
                        {
-                               $filtermethod .= " $where  dima $this->like 
'%$loc1%' ";
+                               $filtermethod .= " $where  dima {$this->like} 
'%$loc1%' ";
                                $where= 'AND';
                        }
 
+                       if ($invoice_id)
+                       {
+                               $filtermethod .= " $where fakturanr 
='{$invoice_id}'";
+                               $where= 'AND';
+                       }
+
                        if ($paid)
                        {
                                $table = 'fm_ecobilagoverf';
@@ -151,7 +158,7 @@
                                        $join_tables .= " $this->join 
fm_b_account ON fm_ecobilagoverf.spbudact_code = fm_b_account.id";
                                }
 
-                               if (!$workorder_id && !$voucher_id)
+                               if (!$workorder_id && !$voucher_id && 
!$invoice_id)
                                {
                                        $start_periode = date('Ym',$start_date);
                                        $end_periode = date('Ym',$end_date);

Modified: trunk/property/inc/class.uiinvoice.inc.php
===================================================================
--- trunk/property/inc/class.uiinvoice.inc.php  2012-02-16 08:59:16 UTC (rev 
8887)
+++ trunk/property/inc/class.uiinvoice.inc.php  2012-02-16 09:30:54 UTC (rev 
8888)
@@ -209,6 +209,7 @@
                        $workorder_id   = phpgw::get_var('workorder_id', 'int');
                        $loc1                   = phpgw::get_var('loc1');
                        $voucher_id     = $this->query && 
ctype_digit($this->query) ? $this->query : phpgw::get_var('voucher_id', 'int');
+                       $invoice_id             = phpgw::get_var('invoice_id');
                        $b_account_class= phpgw::get_var('b_account_class', 
'int');
 
                        $this->save_sessiondata();
@@ -510,6 +511,25 @@
                                                                'style' => 
'filter'
                                                        ),
                                                        array
+                                                       ( // Voucher link
+                                                               'type' => 
'link',
+                                                               'id' => 
'lnk_invoice',
+                                                               'url' => "",
+                                                               'value' => 
lang('invoice number'),
+                                                               'tab_index' => 
9,
+                                                               'style' => 
'filter'
+                                                       ),
+                                                       array
+                                                       ( // Vendor box
+                                                               'name'     => 
'invoice_id',
+                                                               'id'     => 
'txt_invoice',
+                                                               'value'    => 
$invoice_id,
+                                                               'type' => 
'text',
+                                                               'size'    => 10,
+                                                               'tab_index' => 
10,
+                                                               'style' => 
'filter'
+                                                       ),
+                                                       array
                                                        (
                                                                'type' => 
'link',
                                                                'id' => 
'lnk_property',
@@ -522,7 +542,7 @@
                                                                        
'lookup_name'   => 0,
                                                                
))."','Search','left=50,top=100,width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes')",
                                                                'value' => 
lang('property'),
-                                                               'tab_index' => 
9,
+                                                               'tab_index' => 
11,
                                                                'style' => 
'filter'
                                                        ),
                                                        array
@@ -541,7 +561,7 @@
                                                                'value'    => 
$loc1,
                                                                'type' => 
'text',
                                                                'size'    => 8,
-                                                               'tab_index' => 
10,
+                                                               'tab_index' => 
12,
                                                                'style' => 
'filter'
                                                        ),
                                                        array
@@ -550,7 +570,7 @@
                                                                'id' => 
'lnk_voucher',
                                                                'url' => "",
                                                                'value' => 
lang('Voucher ID'),
-                                                               'tab_index' => 
11,
+                                                               'tab_index' => 
13,
                                                                'style' => 
'filter'
                                                        ),
                                                        array
@@ -560,7 +580,7 @@
                                                                'value'    => 
$voucher_id,
                                                                'type' => 
'text',
                                                                'size'    => 8,
-                                                               'tab_index' => 
12,
+                                                               'tab_index' => 
14,
                                                                'style' => 
'filter'
                                                        ),
                                                        array
@@ -569,14 +589,14 @@
                                                                'name' => 
'search',
                                                                'value'    => 
lang('search'),
                                                                'type' => 
'button',
-                                                               'tab_index' => 
13,
+                                                               'tab_index' => 
15,
                                                                'style' => 
'filter'
                                                        ),
                                                        array
                                                        ( // boton exportar
                                                                'type'  => 
'button',
                                                                'id'    => 
'btn_export',
-                                                               'tab_index' => 
13,
+                                                               'tab_index' => 
16,
                                                                'value' => 
lang('download')
                                                        ),
                                                        array
@@ -585,7 +605,7 @@
                                                                'name' => 
'cat_id',
                                                                'value' => 
lang('Category'),
                                                                'type' => 
'button',
-                                                               'tab_index' => 
14,
+                                                               'tab_index' => 
17,
                                                                'style' => 
'filter'
                                                        ),
                                                        array
@@ -594,7 +614,7 @@
                                                                'name' => 
'user_lid',
                                                                'value' => 
user_lid,
                                                                'type' => 
'button',
-                                                               'tab_index' => 
15,
+                                                               'tab_index' => 
18,
                                                                'style' => 
'filter'
                                                        ),
                                                        array
@@ -603,7 +623,7 @@
                                                                'name' => 
'b_account_class',
                                                                'value' => 
lang('No account'),
                                                                'type' => 
'button',
-                                                               'tab_index' => 
16,
+                                                               'tab_index' => 
19,
                                                                'style' => 
'filter'
                                                        ),
                                                        array
@@ -712,7 +732,7 @@
 
                        $content = array();
                        //the first time, $content is empty, because 
$user_lid=''.In the seconfd time, user_lid=all; It is done using  base_java_url.
-                       $content = 
$this->bo->read_invoice($paid,$start_date,$end_date,$vendor_id,$loc1,$workorder_id,$voucher_id);
+                       $content = 
$this->bo->read_invoice($paid,$start_date,$end_date,$vendor_id,$loc1,$workorder_id,$voucher_id,$invoice_id);
 
 
                        $uicols = array (

Modified: trunk/property/js/yahoo/invoice.paid.index.js
===================================================================
--- trunk/property/js/yahoo/invoice.paid.index.js       2012-02-16 08:59:16 UTC 
(rev 8887)
+++ trunk/property/js/yahoo/invoice.paid.index.js       2012-02-16 09:30:54 UTC 
(rev 8888)
@@ -22,16 +22,17 @@
                 [
                  {name:'lnk_workorder', title:'Workorder ID', 
description:'enter the Workorder ID to search by workorder - at any Date'},
                  {name:'lnk_vendor', title:'Vendor', description:'Select the 
vendor by clicking this link'},
+                 {name:'lnk_invoice', title:'Invoice', description:'Enter the 
invoice id - any Date'},
                  {name:'lnk_property', title:'Facilities Managements', 
description:'Select the property by clicking this link'},
                  {name:'lnk_voucher', title:'Voucher', description:'enter the 
voucher ID to search by vouvher - at any Date'}
                 ]
 
-
                var textImput = [
                        {order:0, name:'workorder_id',  id:'txt_workorder'},
                        {order:1, name:'vendor_id',             
id:'txt_vendor'},
-                       {order:1, name:'loc1',                  id:'txt_loc1'},
-                       {order:3, name:'voucher_id',    id:'txt_voucher'}
+                       {order:2, name:'invoice_id',    id:'txt_invoice'},
+                       {order:3, name:'loc1',                  id:'txt_loc1'},
+                       {order:4, name:'voucher_id',    id:'txt_voucher'}
                ]
 
                var toolTips = [
@@ -131,9 +132,3 @@
 
                    loader.insert();
                });
-
-
-
-
-
-




reply via email to

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