[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [9177] property: invoice handling
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [9177] property: invoice handling |
Date: |
Wed, 18 Apr 2012 13:09:11 +0000 |
Revision: 9177
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9177
Author: sigurdne
Date: 2012-04-18 13:09:07 +0000 (Wed, 18 Apr 2012)
Log Message:
-----------
property: invoice handling
Modified Paths:
--------------
trunk/property/inc/class.boinvoice.inc.php
trunk/property/inc/class.soinvoice.inc.php
trunk/property/inc/class.soworkorder.inc.php
trunk/property/inc/class.uiinvoice2.inc.php
trunk/property/js/portico/ajax_invoice.js
trunk/property/js/yahoo/invoice2.index.js
trunk/property/templates/base/invoice2.xsl
Modified: trunk/property/inc/class.boinvoice.inc.php
===================================================================
--- trunk/property/inc/class.boinvoice.inc.php 2012-04-18 11:30:19 UTC (rev
9176)
+++ trunk/property/inc/class.boinvoice.inc.php 2012-04-18 13:09:07 UTC (rev
9177)
@@ -201,6 +201,12 @@
return $this->so->read_single_voucher($voucher_id);
}
+
+ function read_single_line($line_id)
+ {
+ return $this->so->read_single_voucher(0, $line_id);
+ }
+
function
read_consume($start_date='',$end_date='',$vendor_id='',$loc1='',$workorder_id='',$b_account_class='',$district_id='')
{
$start_date =
$this->bocommon->date_to_timestamp($start_date);
@@ -808,18 +814,5 @@
public function update_voucher2($data)
{
$receipt = $this->so->update_voucher2($data);
- $receipt = $this->so->forward($data);
-
- if( isset($data['order_id']) && $data['order_id'])
- {
- if(isset($data['close_order']) &&
$data['close_order'])
- {
-
execMethod('property.soworkorder.close_orders',array($data['order_id']));
- }
- if(isset($data['close_order_orig']) &&
$data['close_order_orig'] && !$data['close_order'])
- {
-
execMethod('property.soworkorder.reopen_orders',array($data['order_id']));
- }
- }
}
}
Modified: trunk/property/inc/class.soinvoice.inc.php
===================================================================
--- trunk/property/inc/class.soinvoice.inc.php 2012-04-18 11:30:19 UTC (rev
9176)
+++ trunk/property/inc/class.soinvoice.inc.php 2012-04-18 13:09:07 UTC (rev
9177)
@@ -447,6 +447,7 @@
'claim_issued'
=> $this->db->f('claim_issued'),
// 'project_id'
=> $this->db->f('project_id'),
'workorder_id'
=> $this->db->f('pmwrkord_code'),
+ 'order_id'
=> $this->db->f('pmwrkord_code'),
'status'
=> $this->db->f('status'),
'closed'
=> $this->db->f('status') == $closed,
'voucher_id'
=> $this->db->f('bilagsnr'),
@@ -470,6 +471,7 @@
'budget_responsible' =>
$this->db->f('budsjettansvarligid'),
'budsjettsigndato'
=> $this->db->f('budsjettsigndato'),
'transfer_time'
=> $this->db->f('overftid'),
+ 'line_text'
=> 'FIX ME soinvoice::read_invoice_sub()'
);
$i++;
@@ -1707,10 +1709,20 @@
*/
public function forward($data)
{
+ $condition = '';
+ if(isset($data['forward']) &&
is_array($data['forward']) && isset($data['line_id']) && $data['line_id'])
+ {
+ $condition = 'WHERE id =' . (int)
$data['line_id'];
+ }
+ else if(isset($data['forward']) &&
is_array($data['forward']) && isset($data['voucher_id']) && $data['voucher_id'])
+ {
+ $condition = 'WHERE bilagsnr =' . (int)
$data['voucher_id'];
+ }
+
$receipt = array();
$local_error= false;
- if(isset($data['forward']) &&
is_array($data['forward']) && isset($data['voucher_id']) && $data['voucher_id'])
+ if($condition)
{
//start check
$check_count =
$this->check_count($data['voucher_id']);
@@ -1790,7 +1802,7 @@
}
$value_set =
$this->db->validate_update($value_set);
- return $this->db->query("UPDATE fm_ecobilag SET
$value_set WHERE bilagsnr = '{$data['voucher_id']}'",__LINE__,__FILE__);
+ return $this->db->query("UPDATE fm_ecobilag SET
$value_set {$condition}",__LINE__,__FILE__);
}
return false;
@@ -1803,20 +1815,28 @@
$GLOBALS['phpgw']->db->transaction_begin();
$value_set = array();
- $value_set['pmwrkord_code'] = $data['order_id'];
- $value_set['dimb'] = $data['dim_b'];
- $value_set['dima'] = $data['dim_a'];
- $value_set['mvakode'] = $data['tax_code'];
- $value_set['project_id'] = $data['project_group'];
- $value_set['spbudact_code'] = $data['b_account_id'];
$value_set['periode'] = $data['period'];
$value_set['periodization'] = $data['periodization'];
$value_set['periodization_start'] =
$data['periodization_start'];
$value_set['kreditnota'] = !!$data['park_invoice'];
$value_set =
$this->db->validate_update($value_set);
- $this->db->query("UPDATE fm_ecobilag SET $value_set
WHERE bilagsnr = '{$data['voucher_id']}'",__LINE__,__FILE__);
+ $this->db->query("UPDATE fm_ecobilag SET $value_set
WHERE bilagsnr =" . (int)$data['voucher_id'],__LINE__,__FILE__);
+ unset($value_set);
+ $value_set_line = array();
+
+ $value_set_line['pmwrkord_code'] = $data['order_id'];
+ $value_set_line['dimb'] = $data['dim_b'];
+ $value_set_line['dima'] = $data['dim_a'];
+ $value_set_line['mvakode'] = $data['tax_code'];
+ $value_set_line['project_id'] = $data['project_group'];
+ $value_set_line['spbudact_code'] =
$data['b_account_id'];
+
+ $value_set_line =
$this->db->validate_update($value_set_line);
+ $this->db->query("UPDATE fm_ecobilag SET
$value_set_line WHERE id = " . (int)$data['line_id'],__LINE__,__FILE__);
+ unset($value_set_line);
+
if($data['order_id'] && $data['b_account_id'])
{
$this->db->query("UPDATE fm_workorder SET
account_id = '{$data['b_account_id']}' WHERE id='{$data['order_id']}'");
@@ -1924,6 +1944,22 @@
$this->db->query("INSERT INTO
fm_ecobilag_process_log ({$cols}) VALUES ({$values})",__LINE__,__FILE__);
}
}
+
+
+ if( isset($data['order_id']) && $data['order_id'])
+ {
+ if(isset($data['close_order']) &&
$data['close_order'])
+ {
+
execMethod('property.soworkorder.close_orders',array($data['order_id']));
+ }
+ if(isset($data['close_order_orig']) &&
$data['close_order_orig'] && !$data['close_order'])
+ {
+
execMethod('property.soworkorder.reopen_orders',array($data['order_id']));
+ }
+ }
+
+ $receipt = $this->forward($data);
+
$GLOBALS['phpgw']->db->transaction_commit();
}
Modified: trunk/property/inc/class.soworkorder.inc.php
===================================================================
--- trunk/property/inc/class.soworkorder.inc.php 2012-04-18 11:30:19 UTC
(rev 9176)
+++ trunk/property/inc/class.soworkorder.inc.php 2012-04-18 13:09:07 UTC
(rev 9177)
@@ -37,6 +37,7 @@
class property_soworkorder
{
var $total_records = 0;
+ protected $global_lock = false;
function __construct()
{
@@ -1379,8 +1380,17 @@
$config =
CreateObject('phpgwapi.config','property');
$config->read();
$closed =
isset($config->config_data['workorder_closed_status']) &&
$config->config_data['workorder_closed_status'] ?
$config->config_data['workorder_closed_status'] : 'closed';
- $this->db->transaction_begin();
+ if ( $this->db->get_transaction() )
+ {
+ $this->global_lock = true;
+ }
+ else
+ {
+ $this->db->transaction_begin();
+ }
+
+
if ($orders && is_array($orders))
{
$historylog_workorder =
CreateObject('property.historylog','workorder');
@@ -1405,13 +1415,25 @@
}
}
- $GLOBALS['phpgw']->db->transaction_commit();
+ if ( !$this->global_lock )
+ {
+ $this->db->transaction_commit();
+ }
return $receipt;
}
public function reopen_orders($orders)
{
+ if ( $this->db->get_transaction() )
+ {
+ $this->global_lock = true;
+ }
+ else
+ {
+ $this->db->transaction_begin();
+ }
+
$config =
CreateObject('phpgwapi.config','property');
$config->read();
$reopen =
isset($config->config_data['workorder_reopen_status']) &&
$config->config_data['workorder_reopen_status'] ?
$config->config_data['workorder_reopen_status'] : 're_opened';
@@ -1432,5 +1454,10 @@
$receipt['message'][] =
array('msg'=>lang('Workorder %1 is %2',$id, $status_code[$entry]));
}
}
+
+ if ( !$this->global_lock )
+ {
+ $this->db->transaction_commit();
+ }
}
}
Modified: trunk/property/inc/class.uiinvoice2.inc.php
===================================================================
--- trunk/property/inc/class.uiinvoice2.inc.php 2012-04-18 11:30:19 UTC (rev
9176)
+++ trunk/property/inc/class.uiinvoice2.inc.php 2012-04-18 13:09:07 UTC (rev
9177)
@@ -59,7 +59,8 @@
'query'
=> true,
'edit'
=> true,
'get_vouchers'
=> true,
- 'get_single_voucher' => true
+ 'get_single_voucher' => true,
+ 'get_single_line'
=> true
);
function __construct()
@@ -84,6 +85,7 @@
{
$receipt = array();
$voucher_id = phpgw::get_var('voucher_id', 'int');
+ $line_id = phpgw::get_var('line_id', 'int');
if($values = phpgw::get_var('values'))
{
@@ -96,6 +98,7 @@
}
$values['voucher_id'] = $voucher_id;
+ $values['line_id'] = $line_id;
if(!$receipt['error'])
{
$receipt =
$this->bo->update_voucher2($values);
@@ -103,7 +106,7 @@
phpgwapi_cache::message_set(lang('voucher is
updated'), 'message');
- $GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'property.uiinvoice2.index', 'voucher_id' =>
$voucher_id));
+ $GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'property.uiinvoice2.index', 'voucher_id' => $voucher_id,
'line_id' => $line_id));
}
else
{
@@ -155,15 +158,21 @@
(
'voucher_list'
=> array('options' => $voucher_list),
),
- 'voucher_info'
=> $this->get_single_voucher($voucher_id),
+ 'voucher_info'
=> $this->get_single_line($line_id),
'datatable' => array(
- 'source' =>
self::link(array('menuaction' => 'property.uiinvoice2.query', 'voucher_id' =>
$voucher_id, 'phpgw_return_as' => 'json')),
+ 'source' =>
self::link(array('menuaction' => 'property.uiinvoice2.query', 'voucher_id' =>
$voucher_id,'line_id' => $line_id,'phpgw_return_as' => 'json')),
'field' => array(
array(
'key' => 'id',
'hidden' => true
),
array(
+ 'key'
=> 'approve_line',
+ 'label'
=> lang('select'),
+
'sortable' => false,
+
'formatter' => 'FormatterCenter',
+ ),
+ array(
'key' =>
'amount',
'label' =>
lang('amount'),
'sortable'
=> true
@@ -181,6 +190,46 @@
'formatter' => 'FormatterCenter',
),
array(
+ 'key'
=> 'budget_account',
+ 'label'
=> lang('budget account'),
+
'sortable' => false,
+
'formatter' => 'FormatterCenter',
+ ),
+
+ array(
+ 'key'
=> 'dima',
+ 'label'
=> lang('dim a'),
+
'sortable' => false,
+
'formatter' => 'FormatterCenter',
+ ),
+ array(
+ 'key'
=> 'dimb',
+ 'label'
=> lang('dim b'),
+
'sortable' => false,
+
'formatter' => 'FormatterCenter',
+ ),
+
+ array(
+ 'key'
=> 'order_id',
+ 'label'
=> lang('order'),
+
'sortable' => false,
+
'formatter' => 'FormatterCenter',
+ ),
+
+ array(
+ 'key'
=> 'project_group',
+ 'label'
=> lang('project group'),
+
'sortable' => false,
+
'formatter' => 'FormatterCenter',
+ ),
+
+ array(
+ 'key'
=> 'line_text',
+ 'label'
=> lang('text'),
+
'sortable' => false,
+
'formatter' => 'FormatterCenter',
+ ),
+ array(
'key' =>
'actions',
'hidden' => true
),
@@ -198,13 +247,24 @@
)
)
);
+/*
+ Art
+ Kategori
+ Koststed
+ Bestillingsnummer
+ Agressoprosjektnr
+ Postringstekst
+ Beløp
+*/
+
+
//_debug_array($data);die();
$GLOBALS['phpgw']->css->add_external_file('/phpgwapi/js/yahoo/layout/assets/skins/sam/layout.css');
phpgwapi_yui::load_widget('layout');
phpgwapi_yui::load_widget('paginator');
- self::add_javascript('registration', 'yahoo',
'pending.index.js');
+// self::add_javascript('registration', 'yahoo',
'pending.index.js');
self::add_javascript('controller',
'controller', 'jquery.js');
self::add_javascript('property', 'portico',
'ajax_invoice.js');
self::add_javascript('property', 'yahoo',
'invoice2.index.js');
@@ -221,19 +281,27 @@
$this->bo->order = phpgw::get_var('sort');
$this->bo->sort = phpgw::get_var('dir');
$this->bo->results = phpgw::get_var('results');
-
+ $line_id = phpgw::get_var('line_id', 'int');
+//_debug_array($_REQUEST); die();
if ( ! $voucher_id =
phpgw::get_var('voucher_id_filter') )
{
$voucher_id = phpgw::get_var('voucher_id');
}
$values = $this->bo->read_invoice_sub($voucher_id);
-
+
foreach($values as &$entry)
{
- // $entry['split'] = "<input type =\"radio\"
name=\"values[split]\" value=\"{$entry['id']}\">";
- $entry['split'] = "<input type =\"text\"
name=\"values[split_amount][{$entry['id']}]\" value=\"\">";
- $entry['approved_amount'] = "<input type
=\"text\" name=\"values[approved_amount][{$entry['id']}]\"
value=\"{$entry['approved_amount']}\">";
+ $_checked = '';
+ if($entry['id'] == $line_id)
+ {
+ $_checked = 'checked="checked"';
+ }
+
+ $entry['approve_line'] = "<input
id=\"approve_line\" type =\"radio\" {$_checked} name=\"values[approve]\"
value=\"{$entry['id']}\">";
+ $entry['split'] = "<input type =\"text\"
name=\"values[split_amount][{$entry['id']}]\" value=\"\" size=\"8\">";
+
+ $entry['approved_amount'] = "<input type
=\"text\" name=\"values[approved_amount][{$entry['id']}]\"
value=\"{$entry['approved_amount']}\" size=\"8\">";
$results['results'][]= $entry;
}
$results['total_records'] = $this->bo->total_records;
@@ -241,8 +309,6 @@
$results['sort'] = 'id';
$results['dir'] = $this->bo->sort ? $this->bo->sort :
'ASC';
-// array_walk($results['results'], array($this,
'add_links'), array($type));
-
return $this->yui_results($results);
}
@@ -257,12 +323,17 @@
return $vouchers;
}
+
public function get_single_voucher($voucher_id = 0)
{
- $voucher_id = $voucher_id ? $voucher_id :
phpgw::get_var('voucher_id', 'int');
+
+ }
+ public function get_single_line($line_id = 0)
+ {
+ $line_id = $line_id ? $line_id :
phpgw::get_var('line_id', 'int');
$voucher_info = array();
- $voucher = $this->bo->read_single_voucher($voucher_id);
+ $voucher = $this->bo->read_single_line($line_id);
$dateformat =
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
$custom_config =
CreateObject('admin.soconfig',$GLOBALS['phpgw']->locations->get_id('property',
'.invoice'));
@@ -428,7 +499,7 @@
$voucher[0]['image_url'] =
$_image_url;
}
$voucher_info['generic']['process_log'] =
$voucher[0]['process_log'];
- // $voucher[0]['image_url'] =
'http://www.nettavisen.no/';
+ $voucher[0]['image_url'] =
'';//'http://www.nettavisen.no/';
}
else
{
Modified: trunk/property/js/portico/ajax_invoice.js
===================================================================
--- trunk/property/js/portico/ajax_invoice.js 2012-04-18 11:30:19 UTC (rev
9176)
+++ trunk/property/js/portico/ajax_invoice.js 2012-04-18 13:09:07 UTC (rev
9177)
@@ -151,32 +151,74 @@
});
});
+ $("#voucher_id_filter").change(function () {
+ $("#voucher_id").val( '' );
+ $("#voucher_id_text").html( '' );
+ $("#line_id").val( '' );
+ $("#order_id").val( '' );
+ $("#project_group").val( '' );
+ $("#invoice_id").html( '' );
+ $("#kid_nr").html( '' );
+ $("#vendor").html('' );
+// $("#janitor").html( '' );
+// $("#supervisor").html( '' );
+// $("#budget_responsible").html( '' );
+ $("#close_order_orig").val( '' );
+ $("#my_initials").val( '' );
+ $("#sign_orig").val( '' );
+ $("#invoice_date").html( '' );
+ $("#payment_date").html( '' );
+ $("#b_account_id").val( '' );
+// $("#amount").html( '' );
+// $("#approved_amount").html( '' );
+ $("#currency").html( '' );
+ $("#oppsynsmannid").html( '' );
+ $("#saksbehandlerid").html( '' );
+ $("#budsjettansvarligid").html( '' );
+ $("#remark").html( '' );
+ $("#process_log").html( '' );
+ $("#dim_a").val('' );
+ $("#dim_b").html( "<option>Velg</option>" );
+ $("#period").html( "<option>Velg</option>" );
+ $("#periodization").html( "<option>Velg</option>" );
+ $("#periodization_start").html( "<option>Velg</option>" );
+ $("#process_code").html( "<option>Velg</option>" );
+ $("#tax_code").html( "<option>0</option>" );
+ $("#approve_as").html( "<option>Velg</option>" );
+ $("#order_text").html( 'Bestilling' );
+ $("#invoice_id_text").html('FakturaNr');
+ $("#close_order").html( '' );
+ $("#close_order_orig").val( '' );
+ $("#park_order").html( '' );
+ document.getElementById('image_content').src = '';
+ });
-
- $("#voucher_id_filter").change(function () {
- var voucher_id = $(this).val();
- var oArgs =
{menuaction:'property.uiinvoice2.get_single_voucher'};
+ $("#approve_line").live("click", function(e){
+ var line_id = $(this).val();
+ var oArgs = {menuaction:'property.uiinvoice2.get_single_line'};
var requestUrl = phpGWLink('index.php', oArgs, true);
$.ajax({
type: 'POST',
dataType: 'json',
- url: requestUrl + "&voucher_id=" + voucher_id,
+ url: requestUrl + "&line_id=" + line_id,
success: function(data) {
var voucher = data['voucher'];
if( voucher != null && voucher.length > 0)
{
- $("#voucher_id").val( voucher_id );
+ $("#line_id").val( line_id );
+ $("#voucher_id").val(
voucher[0].voucher_id );
if( voucher[0].voucher_out_id )
{
- $("#voucher_id_text").html(
voucher[0].voucher_out_id );
+ $("#voucher_id_text").html(
voucher[0].voucher_out_id );
}
else
{
- $("#voucher_id_text").html(
voucher_id );
+ $("#voucher_id_text").html(
voucher[0].voucher_id );
}
+
$("#order_id").val( voucher[0].order_id
);
if(voucher[0].order_id)
@@ -214,8 +256,8 @@
$("#payment_date").html(
voucher[0].payment_date );
$("#b_account_id").val(
voucher[0].b_account_id );
$("#dim_a").val( voucher[0].dim_a );
- $("#amount").html(
data['generic'].amount );
- $("#approved_amount").html(
data['generic'].approved_amount );
+// $("#amount").html(
data['generic'].amount );
+// $("#approved_amount").html(
data['generic'].approved_amount );
$("#currency").html(
voucher[0].currency );
$("#process_log").html(
data['generic'].process_log );
$("#my_initials").val(
data['generic'].my_initials );
@@ -427,8 +469,8 @@
$("#invoice_date").html( '' );
$("#payment_date").html( '' );
$("#b_account_id").val( '' );
- $("#amount").html( '' );
- $("#approved_amount").html( '' );
+// $("#amount").html( '' );
+// $("#approved_amount").html( '' );
$("#currency").html( '' );
$("#oppsynsmannid").html( '' );
$("#saksbehandlerid").html( '' );
Modified: trunk/property/js/yahoo/invoice2.index.js
===================================================================
--- trunk/property/js/yahoo/invoice2.index.js 2012-04-18 11:30:19 UTC (rev
9176)
+++ trunk/property/js/yahoo/invoice2.index.js 2012-04-18 13:09:07 UTC (rev
9177)
@@ -156,3 +156,9 @@
YAHOO.util.Event.onDOMReady( YAHOO.INVOICE.BorderLayout );
+ var FormatterCenter = function(elCell, oRecord, oColumn, oData)
+ {
+ elCell.innerHTML = "<center>"+oData+"</center>";
+ }
+
+
Modified: trunk/property/templates/base/invoice2.xsl
===================================================================
--- trunk/property/templates/base/invoice2.xsl 2012-04-18 11:30:19 UTC (rev
9176)
+++ trunk/property/templates/base/invoice2.xsl 2012-04-18 13:09:07 UTC (rev
9177)
@@ -34,7 +34,16 @@
#_oppsynsmannid { width: 200px; }
#_saksbehandlerid { width: 200px; }
#_budsjettansvarligid { width: 200px; }
+.row_on,.th_bright
+{
+ background-color: #CCEEFF;
+}
+.row_off
+{
+ background-color: #DDF0FF;
+}
+
</style>
@@ -94,14 +103,14 @@
</table>
<form action="#"
name="voucher_form" id="voucher_form" method="post">
<table>
-
<xsl:call-template name="voucher_fields" />
-
<xsl:call-template name="approve"/>
<tr>
<td
colspan = '6'>
<xsl:apply-templates select="paging"/>
<xsl:apply-templates select="datatable"/>
</td>
</tr>
+
<xsl:call-template name="voucher_fields" />
+
<xsl:call-template name="approve"/>
</table>
</form>
</div>
@@ -213,18 +222,19 @@
</xsl:template>
<xsl:template name="voucher_fields" xmlns:php="http://php.net/xsl">
- <tr>
+ <tr class ='row_on'>
<td>
<xsl:value-of select="php:function('lang',
'voucher')" />
</td>
<td>
<input type="hidden" name="voucher_id"
id="voucher_id" value="{voucher_info/voucher/voucher_id} "/>
+ <input type="hidden" name="line_id"
id="line_id" value="{voucher_info/voucher/id}"/>
<div id= 'voucher_id_text'>
<xsl:value-of
select="voucher_info/voucher/voucher_id"/>
</div>
</td>
</tr>
- <tr>
+ <tr class ='row_on'>
<td>
<xsl:value-of select="php:function('lang',
'vendor')" />
</td>
@@ -234,7 +244,7 @@
</div>
</td>
</tr>
- <tr>
+ <tr class ='row_on'>
<td>
<div id="invoice_id_text">
<xsl:choose>
@@ -254,7 +264,7 @@
</td>
</tr>
- <tr>
+ <tr class ='row_on'>
<td>
<xsl:value-of select="php:function('lang', 'kid
nr')" />
</td>
@@ -264,6 +274,7 @@
</div>
</td>
</tr>
+<!--
<tr>
<td>
<xsl:value-of select="php:function('lang',
'amount')" />
@@ -284,7 +295,8 @@
</div>
</td>
</tr>
- <tr>
+-->
+ <tr class ='row_on'>
<td>
<xsl:value-of select="php:function('lang',
'currency')" />
</td>
@@ -294,7 +306,7 @@
</div>
</td>
</tr>
- <tr>
+ <tr class ='row_on'>
<td>
<xsl:value-of select="php:function('lang',
'invoice date')" />
</td>
@@ -305,7 +317,7 @@
</td>
</tr>
- <tr>
+ <tr class ='row_on'>
<td>
<xsl:value-of select="php:function('lang',
'payment date')" />
</td>
@@ -316,8 +328,60 @@
</td>
</tr>
- <tr>
+ <tr class ='row_on'>
<td>
+ <xsl:value-of select="php:function('lang',
'park invoice')" />
+ </td>
+ <td>
+ <div id="park_order">
+ <input type="checkbox"
name="values[park_invoice]" value="1">
+ <xsl:attribute name="title">
+ <xsl:value-of
select="php:function('lang', 'park invoice')"/>
+ </xsl:attribute>
+ <xsl:if
test="voucher_info/voucher/parked = '1'">
+ <xsl:attribute
name="checked">
+
<xsl:text>checked</xsl:text>
+ </xsl:attribute>
+ </xsl:if>
+ </input>
+ <xsl:if
test="voucher_info/voucher/parked = '1'">
+ <xsl:text> X</xsl:text>
+ </xsl:if>
+ </div>
+ </td>
+ </tr>
+ <tr class ='row_on'>
+ <td>
+ <xsl:value-of select="php:function('lang',
'period')" />
+ </td>
+ <td>
+ <select id="period" name="values[period]">
+ <xsl:apply-templates
select="voucher_info/generic/period_list/options"/>
+ </select>
+ </td>
+ </tr>
+ <tr class ='row_on'>
+ <td>
+ <xsl:value-of select="php:function('lang',
'periodization')" />
+ </td>
+ <td>
+ <select id="periodization"
name="values[periodization]">
+ <xsl:apply-templates
select="voucher_info/generic/periodization_list/options"/>
+ </select>
+ </td>
+ </tr>
+ <tr class ='row_on'>
+ <td>
+ <xsl:value-of select="php:function('lang',
'periodization start')" />
+ </td>
+ <td>
+ <select id="periodization_start"
name="values[periodization_start]">
+ <xsl:apply-templates
select="voucher_info/generic/periodization_start_list/options"/>
+ </select>
+ </td>
+ </tr>
+ <tr class ='row_off'>
+ <td>
<div id = 'order_text'>
<xsl:choose>
<xsl:when
test="voucher_info/voucher/order_link != ''">
@@ -336,7 +400,7 @@
<input type="text" name="values[order_id]"
id="order_id" value="{voucher_info/voucher/order_id}"/>
</td>
</tr>
- <tr>
+ <tr class ='row_off'>
<td>
<xsl:value-of select="php:function('lang',
'close order')" />
</td>
@@ -359,30 +423,8 @@
</div>
</td>
</tr>
- <tr>
+ <tr class ='row_off'>
<td>
- <xsl:value-of select="php:function('lang',
'park invoice')" />
- </td>
- <td>
- <div id="park_order">
- <input type="checkbox"
name="values[park_invoice]" value="1">
- <xsl:attribute name="title">
- <xsl:value-of
select="php:function('lang', 'park invoice')"/>
- </xsl:attribute>
- <xsl:if
test="voucher_info/voucher/parked = '1'">
- <xsl:attribute
name="checked">
-
<xsl:text>checked</xsl:text>
- </xsl:attribute>
- </xsl:if>
- </input>
- <xsl:if
test="voucher_info/voucher/parked = '1'">
- <xsl:text> X</xsl:text>
- </xsl:if>
- </div>
- </td>
- </tr>
- <tr>
- <td>
<xsl:value-of select="php:function('lang', 'dim
b')" />
</td>
<td>
@@ -391,7 +433,7 @@
</select>
</td>
</tr>
- <tr>
+ <tr class ='row_off'>
<td>
<xsl:value-of
select="php:function('lang', 'dim a')" />
</td>
@@ -399,7 +441,7 @@
<input type="text" name="values[dim_a]"
id="dim_a" value="{voucher_info/voucher/dim_a}"/>
</td>
</tr>
- <tr>
+ <tr class ='row_off'>
<td>
<xsl:value-of select="php:function('lang', 'tax
code')" />
</td>
@@ -409,7 +451,7 @@
</select>
</td>
</tr>
- <tr>
+ <tr class ='row_off'>
<td>
<xsl:value-of select="php:function('lang',
'project group')" />
</td>
@@ -417,7 +459,7 @@
<input type="text" name="values[project_group]"
id="project_group" value="{voucher_info/voucher/project_group}"/>
</td>
</tr>
- <tr>
+ <tr class ='row_off'>
<td>
<xsl:value-of select="php:function('lang',
'budget account')" />
</td>
@@ -425,45 +467,28 @@
<input type="text" name="values[b_account_id]"
id="b_account_id" value="{voucher_info/voucher/b_account_id}"/>
</td>
</tr>
-
- <tr>
- <td>
- <xsl:value-of select="php:function('lang',
'period')" />
- </td>
- <td>
- <select id="period" name="values[period]">
- <xsl:apply-templates
select="voucher_info/generic/period_list/options"/>
- </select>
- </td>
- </tr>
- <tr>
- <td>
- <xsl:value-of select="php:function('lang',
'periodization')" />
- </td>
- <td>
- <select id="periodization"
name="values[periodization]">
- <xsl:apply-templates
select="voucher_info/generic/periodization_list/options"/>
- </select>
- </td>
- </tr>
-
- <tr>
- <td>
- <xsl:value-of select="php:function('lang',
'periodization start')" />
- </td>
- <td>
- <select id="periodization_start"
name="values[periodization_start]">
- <xsl:apply-templates
select="voucher_info/generic/periodization_start_list/options"/>
- </select>
- </td>
- </tr>
</xsl:template>
<!-- approve voucher -->
<xsl:template xmlns:php="http://php.net/xsl" name="approve">
<xsl:apply-templates
select="voucher_info/generic/approved_list"/>
- <tr>
+ <tr class ='row_off'>
+ <input id="sign_orig" type="hidden"
name="values[sign_orig]" value="{voucher_info/generic/sign_orig}"/>
+ <input id="my_initials" type="hidden"
name="values[my_initials]" value="{voucher_info/generic/my_initials}"/>
+ <td class="th_text" align="left" valign="top"
style="white-space: nowrap;">
+ <xsl:value-of select="php:function('lang',
'approve as')"/>
+ </td>
+ <td class="th_text" valign="top" align="left">
+ <select id = "approve_as"
name="values[approve]" with="40">
+ <xsl:attribute name="title">
+ <xsl:value-of
select="php:function('lang', 'approve as')"/>
+ </xsl:attribute>
+ <xsl:apply-templates
select="voucher_info/generic/approve_list/options"/>
+ </select>
+ </td>
+ </tr>
+ <tr class ='row_off'>
<td>
<xsl:value-of select="php:function('lang',
'voucher process code')" />
</td>
@@ -473,7 +498,7 @@
</select>
</td>
</tr>
- <tr>
+ <tr class ='row_off'>
<td class="th_text" align="left" valign="top"
style="white-space: nowrap;">
<xsl:value-of select="php:function('lang',
'voucher process log')"/>
</td>
@@ -486,28 +511,13 @@
</textarea>
</td>
</tr>
- <tr>
- <input id="sign_orig" type="hidden"
name="values[sign_orig]" value="{voucher_info/generic/sign_orig}"/>
- <input id="my_initials" type="hidden"
name="values[my_initials]" value="{voucher_info/generic/my_initials}"/>
- <td class="th_text" align="left" valign="top"
style="white-space: nowrap;">
- <xsl:value-of select="php:function('lang',
'approve as')"/>
- </td>
- <td class="th_text" valign="top" align="left">
- <select id = "approve_as"
name="values[approve]" with="40">
- <xsl:attribute name="title">
- <xsl:value-of
select="php:function('lang', 'approve as')"/>
- </xsl:attribute>
- <xsl:apply-templates
select="voucher_info/generic/approve_list/options"/>
- </select>
- </td>
- </tr>
</xsl:template>
<!-- New template-->
<xsl:template match="approved_list" xmlns:php="http://php.net/xsl">
- <tr>
+ <tr class ='row_off'>
<td align="left" style="white-space: nowrap;">
<xsl:value-of select="role"/>
</td>
@@ -540,7 +550,7 @@
<xsl:call-template name="datasource-definition" />
<xsl:variable name="label_submit"><xsl:value-of
select="php:function('lang', 'save')" /></xsl:variable>
- <div class="voucher_submit"><input type="submit"
name="values[save_voucher]" id="save_voucher" value="{$label_submit}"/></div>
+ <div class="row_on"><input type="submit" name="values[save_voucher]"
id="save_voucher" value="{$label_submit}"/></div>
</xsl:template>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [9177] property: invoice handling,
Sigurd Nes <=