[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [8430] property: tweaks
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [8430] property: tweaks |
Date: |
Fri, 23 Dec 2011 14:09:09 +0000 |
Revision: 8430
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8430
Author: sigurdne
Date: 2011-12-23 14:09:08 +0000 (Fri, 23 Dec 2011)
Log Message:
-----------
property: tweaks
Modified Paths:
--------------
trunk/property/inc/class.soinvoice.inc.php
trunk/property/inc/class.uiinvoice.inc.php
trunk/property/inc/class.uiproject.inc.php
trunk/property/inc/class.uiworkorder.inc.php
trunk/property/js/yahoo/project.edit.js
trunk/property/js/yahoo/workorder.edit.js
Modified: trunk/property/inc/class.soinvoice.inc.php
===================================================================
--- trunk/property/inc/class.soinvoice.inc.php 2011-12-23 13:15:44 UTC (rev
8429)
+++ trunk/property/inc/class.soinvoice.inc.php 2011-12-23 14:09:08 UTC (rev
8430)
@@ -185,7 +185,7 @@
$querymethod = " $where ( spvend_code =
{$query} OR bilagsnr = {$query})";
}
- $sql = "SELECT bilagsnr, count(bilagsnr) as
invoice_count, sum(belop) as belop,spvend_code,fakturadato FROM $table
$join_tables $filtermethod $querymethod GROUP BY periode,
bilagsnr,spvend_code,fakturadato,oppsynsigndato,saksigndato,budsjettsigndato";
+ $sql = "SELECT bilagsnr, bilagsnr_ut, count(bilagsnr)
as invoice_count, sum(belop) as belop,spvend_code,fakturadato FROM $table
$join_tables $filtermethod $querymethod GROUP BY periode,
bilagsnr,bilagsnr_ut,spvend_code,fakturadato,oppsynsigndato,saksigndato,budsjettsigndato";
$sql2 = "SELECT DISTINCT bilagsnr FROM $table
$join_tables $filtermethod $querymethod";
$this->db->query($sql2,__LINE__,__FILE__);
@@ -212,8 +212,9 @@
$temp[] = array
(
'voucher_id' =>
$this->db->f('bilagsnr'),
+ 'voucher_out_id' =>
$this->db->f('bilagsnr_ut'),
'invoice_count' =>
$this->db->f('invoice_count'),
- 'amount' =>
$this->db->f('belop')
+ 'amount'
=> $this->db->f('belop')
);
}
@@ -280,6 +281,7 @@
$invoice[$i]['counter']
= $i;
$invoice[$i]['current_user']
= $GLOBALS['phpgw_info']['user']['account_lid'];
$invoice[$i]['voucher_id']
= $voucher_id;
+ $invoice[$i]['voucher_out_id']
= $invoice_temp['voucher_out_id'];
$invoice[$i]['invoice_count']
= $invoice_temp['invoice_count'];
$invoice[$i]['vendor_id']
= $this->db->f('spvend_code');
$invoice[$i]['vendor']
= $this->db->f('org_name');
@@ -406,6 +408,7 @@
'status'
=> $this->db->f('status'),
'closed'
=> $this->db->f('status') == $closed,
'voucher_id'
=> $this->db->f('bilagsnr'),
+ 'voucher_out_id'
=> $this->db->f('bilagsnr_ut'),
'id'
=> $this->db->f('id'),
'invoice_id'
=> $this->db->f('fakturanr'),
'budget_account'
=> $this->db->f('spbudact_code'),
Modified: trunk/property/inc/class.uiinvoice.inc.php
===================================================================
--- trunk/property/inc/class.uiinvoice.inc.php 2011-12-23 13:15:44 UTC (rev
8429)
+++ trunk/property/inc/class.uiinvoice.inc.php 2011-12-23 14:09:08 UTC (rev
8430)
@@ -1324,7 +1324,15 @@
//-- links a otros modulos
if($column['format']== "link")
{
-
$json_row[$column['name']] = "<a target='".$column['target']."'
href='".$column['link']."' >".$column['value']."</a>";
+ if($column['name'] ==
'voucher_id_lnk')
+ {
+ $_value =
isset($content[$k]['voucher_out_id']) && $content[$k]['voucher_out_id'] ?
$content[$k]['voucher_out_id'] : $column['value'];
+
$json_row[$column['name']] = "<a target='".$column['target']."'
href='".$column['link']."' >".$_value."</a>";
+ }
+ else
+ {
+
$json_row[$column['name']] = "<a target='".$column['target']."'
href='".$column['link']."' >".$column['value']."</a>";
+ }
}
else if($column['format']==
"input")
{
@@ -1908,7 +1916,7 @@
}
if($i==1)
{
- $current_Consult[] =
array(lang('Voucher Id'),$content[0]['voucher_id']);
+ $current_Consult[] =
array(lang('Voucher Id'),$content[0]['voucher_out_id'] ?
$content[0]['voucher_out_id'] : $content[0]['voucher_id']);
}
}
Modified: trunk/property/inc/class.uiproject.inc.php
===================================================================
--- trunk/property/inc/class.uiproject.inc.php 2011-12-23 13:15:44 UTC (rev
8429)
+++ trunk/property/inc/class.uiproject.inc.php 2011-12-23 14:09:08 UTC (rev
8430)
@@ -1646,6 +1646,7 @@
$content_invoice[] = array
(
'voucher_id' =>
$entry['transfer_time'] ? -1*$entry['voucher_id'] : $entry['voucher_id'],
+ 'voucher_out_id' =>
$entry['voucher_out_id'],
'workorder_id' =>
$entry['workorder_id'],
'status'
=> $entry['status'],
'invoice_id' =>
$entry['invoice_id'],
@@ -1680,6 +1681,7 @@
'name' => "2",
'values' =>
json_encode(array( array('key' =>
'workorder_id','label'=>lang('Workorder'),'sortable'=>true,'resizeable'=>true),
array('key' =>
'voucher_id','label'=>lang('bilagsnr'),'sortable'=>false,'resizeable'=>true,'formatter'=>'YAHOO.widget.DataTable.formatLink_voucher'),
+
array('key' => 'voucher_out_id','hidden'=>true),
array('key' =>
'invoice_id','label'=>lang('invoice
number'),'sortable'=>false,'resizeable'=>true),
array('key' =>
'vendor','label'=>lang('vendor'),'sortable'=>false,'resizeable'=>true),
array('key' =>
'amount','label'=>lang('amount'),'sortable'=>false,'resizeable'=>true,'formatter'=>'FormatterRight'),
Modified: trunk/property/inc/class.uiworkorder.inc.php
===================================================================
--- trunk/property/inc/class.uiworkorder.inc.php 2011-12-23 13:15:44 UTC
(rev 8429)
+++ trunk/property/inc/class.uiworkorder.inc.php 2011-12-23 14:09:08 UTC
(rev 8430)
@@ -1519,6 +1519,7 @@
$content_invoice[] = array
(
'voucher_id' =>
$entry['transfer_time'] ? -1*$entry['voucher_id'] : $entry['voucher_id'],
+ 'voucher_out_id' =>
$entry['voucher_out_id'],
'status'
=> $entry['status'],
'invoice_id' =>
$entry['invoice_id'],
'budget_account' =>
$entry['budget_account'],
@@ -1552,6 +1553,7 @@
(
'name' => "2",
'values' =>
json_encode(array( array('key' =>
'voucher_id','label'=>lang('bilagsnr'),'sortable'=>false,'resizeable'=>true,'formatter'=>'YAHOO.widget.DataTable.formatLink'),
+
array('key' => 'voucher_out_id','hidden'=>true),
array('key' =>
'invoice_id','label'=>lang('invoice
number'),'sortable'=>false,'resizeable'=>true),
array('key' =>
'vendor','label'=>lang('vendor'),'sortable'=>false,'resizeable'=>true),
array('key' =>
'amount','label'=>lang('amount'),'sortable'=>false,'resizeable'=>true,'formatter'=>'FormatterRight'),
Modified: trunk/property/js/yahoo/project.edit.js
===================================================================
--- trunk/property/js/yahoo/project.edit.js 2011-12-23 13:15:44 UTC (rev
8429)
+++ trunk/property/js/yahoo/project.edit.js 2011-12-23 14:09:08 UTC (rev
8430)
@@ -12,14 +12,24 @@
YAHOO.widget.DataTable.formatLink_voucher = function(elCell, oRecord,
oColumn, oData)
{
+ var voucher_out_id = oRecord.getData('voucher_out_id');
+ if(voucher_out_id)
+ {
+ var voucher_id = voucher_out_id;
+ }
+ else
+ {
+ var voucher_id = Math.abs(oData);
+ }
+
if(oData > 0)
{
- elCell.innerHTML = "<a
href="+datatable[2][0]["edit_action"]+"&query="+oData+"&voucher_id="+oData+"&user_lid=all>"
+ oData + "</a>";
+ elCell.innerHTML = "<a
href="+datatable[2][0]["edit_action"]+"&query="+oData+"&voucher_id="+oData+"&user_lid=all>"
+ voucher_id + "</a>";
}
else
{
oData = -1*oData;
- elCell.innerHTML = "<a
href="+datatable[2][0]["edit_action"]+"&voucher_id="+oData+"&user_lid=all&paid=true>"
+ oData + "</a>";
+ elCell.innerHTML = "<a
href="+datatable[2][0]["edit_action"]+"&voucher_id="+oData+"&user_lid=all&paid=true>"
+ voucher_id + "</a>";
}
};
@@ -93,7 +103,7 @@
newTR = document.createElement('tr');
td_sum('Sum');
- td_empty(3);
+ td_empty(4);
td_sum(tmp_sum1);
td_sum(tmp_sum2);
td_empty(4);
Modified: trunk/property/js/yahoo/workorder.edit.js
===================================================================
--- trunk/property/js/yahoo/workorder.edit.js 2011-12-23 13:15:44 UTC (rev
8429)
+++ trunk/property/js/yahoo/workorder.edit.js 2011-12-23 14:09:08 UTC (rev
8430)
@@ -4,14 +4,23 @@
YAHOO.widget.DataTable.formatLink = function(elCell, oRecord, oColumn,
oData)
{
+ var voucher_out_id = oRecord.getData('voucher_out_id');
+ if(voucher_out_id)
+ {
+ var voucher_id = voucher_out_id;
+ }
+ else
+ {
+ var voucher_id = Math.abs(oData);
+ }
if(oData > 0)
{
- elCell.innerHTML = "<a
href="+datatable[2][0]["edit_action"]+"&query="+oData+"&voucher_id="+oData+"&user_lid=all>"
+ oData + "</a>";
+ elCell.innerHTML = "<a
href="+datatable[2][0]["edit_action"]+"&query="+oData+"&voucher_id="+oData+"&user_lid=all>"
+ voucher_id + "</a>";
}
else
{
oData = -1*oData;
- elCell.innerHTML = "<a
href="+datatable[2][0]["edit_action"]+"&voucher_id="+oData+"&user_lid=all&paid=true>"
+ oData + "</a>";
+ elCell.innerHTML = "<a
href="+datatable[2][0]["edit_action"]+"&voucher_id="+oData+"&user_lid=all&paid=true>"
+ voucher_id + "</a>";
}
};
@@ -43,7 +52,7 @@
newTR = document.createElement('tr');
td_sum('Sum');
- td_empty(2);
+ td_empty(3);
td_sum(tmp_sum1);
td_sum(tmp_sum2);
td_empty(4);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [8430] property: tweaks,
Sigurd Nes <=