[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: property/inc class.boinvoice.inc.php,1.5,1.6 cla
From: |
Sigurd Nes <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: property/inc class.boinvoice.inc.php,1.5,1.6 class.soinvoice.inc.php,1.5,1.6 class.uiinvoice.inc.php,1.5,1.6 class.uiXport.inc.php,1.12,1.13 |
Date: |
Tue, 14 Jan 2003 14:20:13 -0500 |
Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv8810/inc
Modified Files:
class.boinvoice.inc.php class.soinvoice.inc.php
class.uiinvoice.inc.php class.uiXport.inc.php
Log Message:
no message
Index: class.boinvoice.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boinvoice.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** class.boinvoice.inc.php 6 Jan 2003 16:51:12 -0000 1.5
--- class.boinvoice.inc.php 14 Jan 2003 19:20:09 -0000 1.6
***************
*** 117,120 ****
--- 117,133 ----
}
+ function read_invoice_sub($voucher_id='')
+ {
+ $invoice = $this->so->read_invoice_sub(array('start' =>
$this->start,'query' => $this->query,'sort' => $this->sort,'order' =>
$this->order,
+
'user_lid' => $this->user_lid,'cat_id' =>
$this->cat_id,'voucher_id'=>$voucher_id));
+ $this->total_records = $this->so->total_records;
+ return $invoice;
+ }
+
+ function read_remark($id='')
+ {
+ return $remark = $this->so->read_remark($id);
+ }
+
function update_invoice($values)
***************
*** 128,142 ****
//_debug_array($entry);
! if($entry['invoice_id'])
{
! $invoice_id=$entry['invoice_id'];
! $check_count =
$this->so->check_count($invoice_id);
if (!($check_count['dima_count'] ==
$entry['invoice_count']))
{
! $error[$errorcount++] =
array('msg'=>lang('Dima is missing from sub invoice in:'). "
".$entry['invoice_id']);
$local_error= true;
}
--- 141,155 ----
//_debug_array($entry);
! if($entry['voucher_id'])
{
! $voucher_id=$entry['voucher_id'];
! $check_count =
$this->so->check_count($voucher_id);
if (!($check_count['dima_count'] ==
$entry['invoice_count']))
{
! $error[$errorcount++] =
array('msg'=>lang('Dima is missing from sub invoice in:'). "
".$entry['voucher_id']);
$local_error= true;
}
***************
*** 146,150 ****
if
(!($check_count['spbudact_code_count'] == $entry['invoice_count']))
{
! $error[$errorcount++] =
array('msg'=>lang('Budget code is missing from sub invoice in :'). "
".$entry['invoice_id']);
$local_error= true;
}
--- 159,163 ----
if
(!($check_count['spbudact_code_count'] == $entry['invoice_count']))
{
! $error[$errorcount++] =
array('msg'=>lang('Budget code is missing from sub invoice in :'). "
".$entry['voucher_id']);
$local_error= true;
}
***************
*** 262,267 ****
if
(!($entry['num_days_orig']==$entry['num_days']))
{
! $payment_date =
date($this->bocommon->dateformat,$entry['timestamp_invoice_date']+(24*3600*$entry['num_days']));
!
$GLOBALS['phpgw']->db->query("update t_ecobilag set forfallsdato=
'$payment_date' where bilagsnr='$invoice_id'");
}
--- 275,280 ----
if
(!($entry['num_days_orig']==$entry['num_days']))
{
! $payment_date =
date($this->bocommon->dateformat,$entry['timestamp_voucher_date']+(24*3600*$entry['num_days']));
!
$GLOBALS['phpgw']->db->query("update t_ecobilag set forfallsdato=
'$payment_date' where bilagsnr='$voucher_id'");
}
***************
*** 287,295 ****
{
! $sql= "update t_ecobilag set
$blank_date $kommma_blank $sign_field $sign_id $kommma $sign_date_field
$sign_date $kommma $transfer_sign_field $transfer_id $transfer_date_field
$transfer_date ,kreditnota='$wait_for_kreditnota' where
bilagsnr='$invoice_id'";
$GLOBALS['phpgw']->db->query($sql);
// echo $sql.'<br>';
!
$message[$invoice_id]=array('msg' => lang('Invoice is updated: ') .
$invoice_id);
}
--- 300,308 ----
{
! $sql= "update t_ecobilag set
$blank_date $kommma_blank $sign_field $sign_id $kommma $sign_date_field
$sign_date $kommma $transfer_sign_field $transfer_id $transfer_date_field
$transfer_date ,kreditnota='$wait_for_kreditnota' where
bilagsnr='$voucher_id'";
$GLOBALS['phpgw']->db->query($sql);
// echo $sql.'<br>';
!
$message[$voucher_id]=array('msg' => lang('voucher is updated: ') .
$voucher_id);
}
***************
*** 310,313 ****
--- 323,334 ----
+ function update_invoice_sub($values)
+ {
+
+ //_debug_array($values);
+
+ return $this->so->update_invoice_sub($values);
+ }
+
function get_list_role($role='',$selected='')
{
***************
*** 355,361 ****
}
! function update_period($invoice_id='',$period='')
{
! return $message =
$this->so->update_period($invoice_id,$period);
}
--- 376,412 ----
}
! function tax_code_list($selected='')
! {
! $tax_codes=$this->so->tax_code_list();
!
! while (is_array($tax_codes) && list(,$code) =
each($tax_codes))
! {
! $sel_code = '';
! if ($code['id']==$selected)
! {
! $sel_code = 'selected';
! }
!
! $tax_code_list[] = array
! (
! 'id' => $code['id'],
! 'selected' => $sel_code
! );
! }
!
! for ($i=0;$i<count($tax_code_list);$i++)
! {
! if ($tax_code_list[$i]['selected'] !=
'selected')
! {
! unset($tax_code_list[$i]['selected']);
! }
! }
!
! return $tax_code_list;
! }
!
! function update_period($voucher_id='',$period='')
{
! return $message =
$this->so->update_period($voucher_id,$period);
}
Index: class.soinvoice.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soinvoice.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** class.soinvoice.inc.php 6 Jan 2003 16:51:12 -0000 1.5
--- class.soinvoice.inc.php 14 Jan 2003 19:20:09 -0000 1.6
***************
*** 107,111 ****
$invoice_temp[] = array
(
! 'invoice_id' =>
$this->db->f('bilagsnr'),
'invoice_count' =>
$this->db->f('invoice_count'),
'amount' =>
$this->db->f('belop')
--- 107,111 ----
$invoice_temp[] = array
(
! 'voucher_id' =>
$this->db->f('bilagsnr'),
'invoice_count' =>
$this->db->f('invoice_count'),
'amount' =>
$this->db->f('belop')
***************
*** 123,132 ****
$role= $this->check_role();
!
$invoice_id=$invoice_temp[$i]['invoice_id'];
$sql = "SELECT
spvend_code,oppsynsmannid,saksbehandlerid,budsjettansvarligid,"
. "
utbetalingid,oppsynsigndato,saksigndato,budsjettsigndato,utbetalingsigndato,fakturadato,org_name,"
. "
forfallsdato,periode,artid,kidnr,kreditnota "
! . " from t_ecobilag $this->join
phpgw_addressbook ON phpgw_addressbook.id = t_ecobilag.spvend_code WHERE
bilagsnr = '$invoice_id' "
. " group by
bilagsnr,spvend_code,oppsynsmannid,saksbehandlerid,budsjettansvarligid,"
. "
utbetalingid,oppsynsigndato,saksigndato,budsjettsigndato,utbetalingsigndato,fakturadato,org_name,"
--- 123,132 ----
$role= $this->check_role();
!
$voucher_id=$invoice_temp[$i]['voucher_id'];
$sql = "SELECT
spvend_code,oppsynsmannid,saksbehandlerid,budsjettansvarligid,"
. "
utbetalingid,oppsynsigndato,saksigndato,budsjettsigndato,utbetalingsigndato,fakturadato,org_name,"
. "
forfallsdato,periode,artid,kidnr,kreditnota "
! . " from t_ecobilag $this->join
phpgw_addressbook ON phpgw_addressbook.id = t_ecobilag.spvend_code WHERE
bilagsnr = '$voucher_id' "
. " group by
bilagsnr,spvend_code,oppsynsmannid,saksbehandlerid,budsjettansvarligid,"
. "
utbetalingid,oppsynsigndato,saksigndato,budsjettsigndato,utbetalingsigndato,fakturadato,org_name,"
***************
*** 137,146 ****
$this->db->next_record();
! $timestamp_invoice_date=
mktime(0,0,0,date(m,strtotime($this->db->f('fakturadato'))),date(d,strtotime($this->db->f('fakturadato'))),date(y,strtotime($this->db->f('fakturadato'))));
$timestamp_payment_date=
mktime(0,0,0,date(m,strtotime($this->db->f('forfallsdato'))),date(d,strtotime($this->db->f('forfallsdato'))),date(y,strtotime($this->db->f('forfallsdato'))));
$invoice[$i]['counter']
= $i;
$invoice[$i]['current_user']
= strtoupper($GLOBALS['phpgw_info']['user']['account_lid']);
! $invoice[$i]['invoice_id']
= $invoice_id;
$invoice[$i]['invoice_count']
= $invoice_temp[$i]['invoice_count'];
$invoice[$i]['vendor_id']
= $this->db->f('spvend_code');
--- 137,146 ----
$this->db->next_record();
! $timestamp_voucher_date=
mktime(0,0,0,date(m,strtotime($this->db->f('fakturadato'))),date(d,strtotime($this->db->f('fakturadato'))),date(y,strtotime($this->db->f('fakturadato'))));
$timestamp_payment_date=
mktime(0,0,0,date(m,strtotime($this->db->f('forfallsdato'))),date(d,strtotime($this->db->f('forfallsdato'))),date(y,strtotime($this->db->f('forfallsdato'))));
$invoice[$i]['counter']
= $i;
$invoice[$i]['current_user']
= strtoupper($GLOBALS['phpgw_info']['user']['account_lid']);
! $invoice[$i]['voucher_id']
= $voucher_id;
$invoice[$i]['invoice_count']
= $invoice_temp[$i]['invoice_count'];
$invoice[$i]['vendor_id']
= $this->db->f('spvend_code');
***************
*** 159,163 ****
$invoice[$i]['budget_date']
= $this->db->f('budsjettsigndato');
$invoice[$i]['transfer_date']
= $this->db->f('utbetalingsigndato');
! $invoice[$i]['invoice_date']
=
$GLOBALS['phpgw']->common->show_date($timestamp_invoice_date,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
$invoice[$i]['payment_date']
=
$GLOBALS['phpgw']->common->show_date($timestamp_payment_date,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
$invoice[$i]['period']
= $this->db->f('periode');
--- 159,163 ----
$invoice[$i]['budget_date']
= $this->db->f('budsjettsigndato');
$invoice[$i]['transfer_date']
= $this->db->f('utbetalingsigndato');
! $invoice[$i]['voucher_date']
=
$GLOBALS['phpgw']->common->show_date($timestamp_voucher_date,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
$invoice[$i]['payment_date']
=
$GLOBALS['phpgw']->common->show_date($timestamp_payment_date,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
$invoice[$i]['period']
= $this->db->f('periode');
***************
*** 166,171 ****
$invoice[$i]['kreditnota']
= $this->db->f('kreditnota');
$invoice[$i]['amount']
= $invoice_temp[$i]['amount'];
! $invoice[$i]['num_days']
=
intval(($timestamp_payment_date-$timestamp_invoice_date)/(24*3600));
! $invoice[$i]['timestamp_invoice_date']
= $timestamp_invoice_date;
if($invoice[$i]['current_user']==$invoice[$i]['janitor'] &&
$invoice[$i]['jan_date']):
--- 166,171 ----
$invoice[$i]['kreditnota']
= $this->db->f('kreditnota');
$invoice[$i]['amount']
= $invoice_temp[$i]['amount'];
! $invoice[$i]['num_days']
=
intval(($timestamp_payment_date-$timestamp_voucher_date)/(24*3600));
! $invoice[$i]['timestamp_voucher_date']
= $timestamp_voucher_date;
if($invoice[$i]['current_user']==$invoice[$i]['janitor'] &&
$invoice[$i]['jan_date']):
***************
*** 193,196 ****
--- 193,383 ----
}
+
+ function read_invoice_sub($data)
+ {
+ if(is_array($data))
+ {
+ if ($data['start'])
+ {
+ $start=$data['start'];
+ }
+ else
+ {
+ $start=0;
+ }
+ $filter =
(isset($data['filter'])?$data['filter']:'none');
+ $sort =
(isset($data['sort'])?$data['sort']:'DESC');
+ $order =
(isset($data['order'])?$data['order']:'');
+ $voucher_id =
(isset($data['voucher_id'])?$data['voucher_id']:0);
+ }
+
+
+ if ($order)
+ {
+ $ordermethod = " order by $order $sort";
+ }
+ else
+ {
+ $ordermethod = ' order by bilagsnr DESC';
+ }
+
+ if ($voucher_id)
+ {
+ $filtermethod = " WHERE ( bilagsnr=
'$voucher_id')";
+ }
+
+ $sql = "SELECT
t_ecobilag.*,fm_wo_wrkorders.status,fm_wo_wrkorders.charge_tenant FROM
t_ecobilag $this->join fm_wo_wrkorders on fm_wo_wrkorders.id =
t_ecobilag.pmwrkord_code $filtermethod ";
+
+ $this->db2->query($sql,__LINE__,__FILE__);
+ $this->total_records = $this->db2->num_rows();
+ $this->db->query($sql .
$ordermethod,$start,__LINE__,__FILE__);
+
+ $i = 0;
+
+ while ($this->db->next_record())
+ {
+ $invoice[$i]['counter']
= $i;
+ $invoice[$i]['workorder_id']
= $this->db->f('pmwrkord_code');
+ $invoice[$i]['status']
= $this->db->f('status');
+ if ($this->db->f('status')=='closed')
+ {
+ $invoice[$i]['closed']
= True;
+ }
+ $invoice[$i]['voucher_id']
= $voucher_id;
+ $invoice[$i]['id']
= $this->db->f('id');
+ $invoice[$i]['invoice_id']
= $this->db->f('fakturanr');
+ $invoice[$i]['budget_account']
= $this->db->f('spbudact_code');
+ $invoice[$i]['dima']
= $this->db->f('dima');
+ $invoice[$i]['dimb']
= $this->db->f('dimb');
+ $invoice[$i]['dimd']
= $this->db->f('dimd');
+ if ($this->db->f('merknad'))
+ {
+ $invoice[$i]['remark']
= True;
+ }
+ $invoice[$i]['tax_code']
= $this->db->f('mvakode');
+ $invoice[$i]['amount']
= $this->db->f('belop');
+ $invoice[$i]['charge_tenant']
= $this->db->f('charge_tenant');
+ $i++;
+
+ }
+
+ return $invoice;
+
+ }
+
+
+
+
+ function update_invoice_sub($values)
+ {
+ $errorcount = 0;
+
+ $GLOBALS['phpgw']->db->transaction_begin();
+
+ while (is_array($values) && list(,$entry) =
each($values))
+ {
+ $local_error='';
+ //_debug_array($entry);
+
+
+ if ($entry['budget_account'])
+ {
+
$budget_account=$entry['budget_account'];
+
+ $GLOBALS['phpgw']->db->query("select
count(*) from fm_wo_accounts where id =$budget_account");
+ $GLOBALS['phpgw']->db->next_record();
+ if ($GLOBALS['phpgw']->db->f(0) == 0)
+ {
+ $error[$errorcount++] =
array('msg'=>lang('This account is not valid:'). " ".$budget_account);
+ $local_error= true;
+ }
+ }
+ else
+ {
+ $error[$errorcount++] =
array('msg'=>lang('Budget account is missing:'));
+ $local_error= true;
+ }
+
+ if(!$entry['dimd'])
+ {
+ $dimd_field="dimd=NULL";
+ }
+ else
+ {
+ $dimd=$entry['dimd'];
+ $GLOBALS['phpgw']->db->query("select
count(*) from fm_wo_dim_d where id =$dimd");
+ $GLOBALS['phpgw']->db->next_record();
+ if ($GLOBALS['phpgw']->db->f(0) == 0)
+ {
+ $error[$errorcount++] =
array('msg'=>lang('This Dim D is not valid:'). " ".$dimd);
+ $local_error= true;
+ }
+
+ $dimd_field="dimd="."'" . $dimd . "'";
+ }
+
+ if (!$entry['dima'])
+ {
+ $dima_field="dima=NULL";
+ $error[$errorcount++] =
array('msg'=>lang('Dim A is missing'));
+ $local_error= true;
+ }
+ else
+ {
+ $dima_check=substr($entry['dima'],0,4);
+ $GLOBALS['phpgw']->db->query("select
count(*) from boei_objekt where objekt_id = $dima_check ");
+ $GLOBALS['phpgw']->db->next_record();
+ if ($GLOBALS['phpgw']->db->f(0) == 0)
+ {
+ $error[$errorcount++] =
array('msg'=>lang('This Dim A is not valid:'). " ".$entry['dima']);
+ $local_error= true;
+ }
+ settype($entry['dima'],"int");
+ $dima_field="dima="."'" .
$entry['dima'] . "'";
+
+ }
+
+ if (! $local_error)
+ {
+
+ $id = $entry['id'];
+ $tax_code = $entry['tax_code'];
+ $workorder_id=$entry['workorder_id'];
+ if($entry['close_order'])
+ {
+
$GLOBALS['phpgw']->db->query("update fm_wo_wrkorders set status='closed' where
id='$workorder_id'");
+ }
+
+ if(!$entry['close_order'] &&
$entry['close_order_orig'])
+ {
+
$GLOBALS['phpgw']->db->query("update fm_wo_wrkorders set status='re_opened'
where id='$workorder_id'");
+ }
+
+ $GLOBALS['phpgw']->db->query("update
t_ecobilag set $dima_field , $dimd_field, mvakode = '$tax_code',spbudact_code
= '$budget_account' where id='$id'");
+
+ $message =
array('msg'=>lang('Voucher is updated '));
+ }
+
+ }
+
+ $GLOBALS['phpgw']->db->transaction_commit();
+
+
+ $receipt= array(
+ 'message' => $message,
+ 'error' =>$error);
+
+ return $receipt;
+ }
+
+ function read_remark($id='')
+ {
+ $this->db->query(" SELECT merknad from t_ecobilag
where id= '$id'");
+ $this->db->next_record();
+
+ return $this->db->f('merknad');
+ }
+
+
function check_role()
{
***************
*** 211,220 ****
}
! function check_count($invoice_id)
{
$user_id = $GLOBALS['phpgw_info']['user']['account_id'];
! $this->db->query("select count(dima) as dima_count ,
count(spbudact_code) as spbudact_code_count from t_ecobilag where bilagsnr
='$invoice_id'");
$this->db->next_record();
--- 398,407 ----
}
! function check_count($voucher_id)
{
$user_id = $GLOBALS['phpgw_info']['user']['account_id'];
! $this->db->query("select count(dima) as dima_count ,
count(spbudact_code) as spbudact_code_count from t_ecobilag where bilagsnr
='$voucher_id'");
$this->db->next_record();
***************
*** 228,240 ****
! function update_period($invoice_id='',$period='')
{
$this->db->transaction_begin();
! $this->db->query("update t_ecobilag set
periode='$period' where bilagsnr='$invoice_id'");
$this->db->transaction_commit();
! return lang('invoice period is updated');
}
--- 415,427 ----
! function update_period($voucher_id='',$period='')
{
$this->db->transaction_begin();
! $this->db->query("update t_ecobilag set
periode='$period' where bilagsnr='$voucher_id'");
$this->db->transaction_commit();
! return lang('voucher period is updated');
}
***************
*** 271,274 ****
--- 458,475 ----
+ function tax_code_list($selected='')
+ {
+ $this->db->query("SELECT * FROM t_ecomva order by id
asc ");
+ while ($this->db->next_record())
+ {
+ $tax_code_list[] = Array(
+ 'id' => $this->db->f('id'),
+ );
+ }
+
+ return $tax_code_list;
+ }
+
+
function get_list_ecoart()
{
***************
*** 284,287 ****
--- 485,489 ----
return $art_list;
}
+
//----------
Index: class.uiinvoice.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiinvoice.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** class.uiinvoice.inc.php 9 Jan 2003 23:10:22 -0000 1.5
--- class.uiinvoice.inc.php 14 Jan 2003 19:20:09 -0000 1.6
***************
*** 24,29 ****
'index' => True,
'edit_period' => True,
! 'property' => True,
! 'equipment' => True
);
--- 24,29 ----
'index' => True,
'edit_period' => True,
! 'list_sub' => True,
! 'remark' => True
);
***************
*** 100,105 ****
$content[$i]['lang_payment_date']
= lang('Payment Date');
! $content[$i]['link_sub']
= $this->currentapp.'.uiinvoice.list_sub';
! $content[$i]['lang_sub']
= lang('Invoice ID');
$content[$i]['lang_sub_help']
= lang('Klick this link to enter the list of sub-invoices');
$content[$i]['link_period']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiinvoice.edit_period');
--- 100,105 ----
$content[$i]['lang_payment_date']
= lang('Payment Date');
! $content[$i]['link_sub']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiinvoice.list_sub&sub='.$sub);
! $content[$i]['lang_sub']
= lang('Voucher ID');
$content[$i]['lang_sub_help']
= lang('Klick this link to enter the list of sub-invoices');
$content[$i]['link_period']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiinvoice.edit_period');
***************
*** 113,117 ****
$table_header[] = array
(
! 'sort_invoice' =>
$this->nextmatchs->show_sort_order(array
(
'sort' => $this->sort,
--- 113,117 ----
$table_header[] = array
(
! 'sort_voucher' =>
$this->nextmatchs->show_sort_order(array
(
'sort' => $this->sort,
***************
*** 123,128 ****
'user_lid'
=> $this->user_lid)
)),
! 'lang_invoice' =>
lang('invoice'),
! 'sort_invoice_date'
=> $this->nextmatchs->show_sort_order(array
(
'sort' => $this->sort,
--- 123,128 ----
'user_lid'
=> $this->user_lid)
)),
! 'lang_voucher' =>
lang('voucher'),
! 'sort_voucher_date'
=> $this->nextmatchs->show_sort_order(array
(
'sort' => $this->sort,
***************
*** 134,138 ****
'user_lid'
=> $this->user_lid)
)),
! 'lang_invoice_date' =>
lang('Invoice Date'),
'lang_days'
=> lang('Days'),
'lang_sum'
=> lang('Sum'),
--- 134,138 ----
'user_lid'
=> $this->user_lid)
)),
! 'lang_voucher_date' =>
lang('Voucher Date'),
'lang_days'
=> lang('Days'),
'lang_sum'
=> lang('Sum'),
***************
*** 183,191 ****
'error'
=> $receipt['error'],
'overlib_source'
=> './'.$this->currentapp.'/inc/overlib.js',
'form_action'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
'lang_save'
=> lang('save'),
'done_action'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiinvoice.index'),
'lang_done_statustext' =>
lang('Back to the list'),
! 'lang_save_statustext' =>
lang('Save the invoice'),
'links'
=> $links,
'allow_all_rows'
=> false,
--- 183,192 ----
'error'
=> $receipt['error'],
'overlib_source'
=> './'.$this->currentapp.'/inc/overlib.js',
+ 'check_source'
=> './'.$this->currentapp.'/inc/check.js',
'form_action'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
'lang_save'
=> lang('save'),
'done_action'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiinvoice.index'),
'lang_done_statustext' =>
lang('Back to the list'),
! 'lang_save_statustext' =>
lang('Save the voucher'),
'links'
=> $links,
'allow_all_rows'
=> false,
***************
*** 196,201 ****
'link_url'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
'img_path'
=> $GLOBALS['phpgw']->common->get_image_path('phpgwapi'),
'appname'
=> lang($this->currentapp),
! 'function_msg'
=> lang('list invoice'),
'lang_no_cat'
=> lang('no category'),
'lang_cat_statustext' =>
lang('Select the category the building belongs to. To do not use a category
select NO CATEGORY'),
--- 197,203 ----
'link_url'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
'img_path'
=> $GLOBALS['phpgw']->common->get_image_path('phpgwapi'),
+ 'img_check'
=>
$GLOBALS['phpgw']->common->get_image_path($this->currentapp).'/check.gif',
'appname'
=> lang($this->currentapp),
! 'function_msg'
=> lang('list voucher'),
'lang_no_cat'
=> lang('no category'),
'lang_cat_statustext' =>
lang('Select the category the building belongs to. To do not use a category
select NO CATEGORY'),
***************
*** 211,216 ****
'query'
=> $this->query,
'lang_submit'
=> lang('submit'),
! 'table_header_list_invoice' =>
$table_header,
! 'values_list_invoice' =>
$content,
'table_done'
=> $table_done
);
--- 213,218 ----
'query'
=> $this->query,
'lang_submit'
=> lang('submit'),
! 'table_header_list_voucher' =>
$table_header,
! 'values_list_voucher' =>
$content,
'table_done'
=> $table_done
);
***************
*** 218,222 ****
//_debug_array($data);
!
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list_invoice' => $data));
$this->save_sessiondata();
}
--- 220,384 ----
//_debug_array($data);
!
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list_voucher' => $data));
! $this->save_sessiondata();
! }
!
! function list_sub()
! {
!
!
$GLOBALS['phpgw']->xslttpl->add_file(array('invoice','menu',
!
'nextmatchs',
!
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'app_header'));
!
! $sub = get_var('sub',array('POST','GET'));
!
! $links = $this->bocommon->menu($sub);
!
! $values =
get_var('values',array('POST','GET'));
! $voucher_id =
get_var('voucher_id',array('POST','GET'));
!
! if($values[0]['save'])
! {
! $receipt=$this->bo->update_invoice_sub($values);
!
! }
!
! //_debug_array($values);
!
! //echo $voucher_id;
!
!
! if ($voucher_id)
! {
! $content =
$this->bo->read_invoice_sub($voucher_id);
! }
!
! $i=0;
! if(is_array($content))
! {
! while(each($content))
! {
!
$content[$i]['lang_tax_code_statustext'] = lang('select the appropiate
tax code');
! $content[$i]['tax_code_list']
= $this->bo->tax_code_list($content[$i]['tax_code']);
! $content[$i]['lang_remark']
= lang('Remark');
! $content[$i]['link_remark']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiinvoice.remark');
! $content[$i]['lang_remark_help']
= lang('Klick this link to view the remark');
! $content[$i]['link_workorder']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiworkorder.view');
! $i++;
! }
! }
!
! //_debug_array($content);
! $table_header[] = array
! (
! 'sort_workorder' =>
$this->nextmatchs->show_sort_order(array
!
(
!
'sort' => $this->sort,
!
'var' => 'pmwrkord_code',
!
'order' => $this->order,
!
'extra' => array('menuaction' =>
$this->currentapp.'.uiinvoice.list_sub',
!
'cat_id'
=>$this->cat_id,
!
'sub'
=>$this->sub,
!
'voucher_id'
=> $voucher_id)
!
)),
! 'lang_workorder' =>
lang('Workorder'),
! 'sort_budget_account'
=> $this->nextmatchs->show_sort_order(array
!
(
!
'sort' => $this->sort,
!
'var' => 'spbudact_code',
!
'order' => $this->order,
!
'extra' => array('menuaction' =>
$this->currentapp.'.uiinvoice.list_sub',
!
'cat_id'
=>$this->cat_id,
!
'sub'
=>$this->sub,
!
'voucher_id'
=> $voucher_id)
!
)),
! 'lang_budget_account' =>
lang('Budget account'),
!
! 'sort_sum' =>
$this->nextmatchs->show_sort_order(array
!
(
!
'sort' => $this->sort,
!
'var' => 'belop',
!
'order' => $this->order,
!
'extra' => array('menuaction' =>
$this->currentapp.'.uiinvoice.list_sub',
!
'cat_id'
=>$this->cat_id,
!
'sub'
=>$this->sub,
!
'voucher_id'
=> $voucher_id)
!
)),
!
! 'lang_sum'
=> lang('Sum'),
! 'lang_type'
=> lang('Type'),
! 'lang_close_order' =>
lang('Close order'),
! 'lang_charge_tenant' => lang('Charge
tenant'),
! 'lang_invoice_id' =>
lang('Invoice Id'),
! 'sort_dima' =>
$this->nextmatchs->show_sort_order(array
!
(
!
'sort' => $this->sort,
!
'var' => 'dima',
!
'order' => $this->order,
!
'extra' => array('menuaction' =>
$this->currentapp.'.uiinvoice.list_sub',
!
'cat_id'
=>$this->cat_id,
!
'sub'
=>$this->sub,
!
'voucher_id'
=> $voucher_id)
!
)),
! 'lang_dima'
=> lang('Dim A'),
! 'lang_dimb'
=> lang('Dim B'),
! 'lang_dimd'
=> lang('Dim D'),
! 'lang_tax_code' =>
lang('Tax code'),
! 'lang_remark' =>
lang('Remark'),
!
!
!
!
!
! );
!
! $table_done[] = array
! (
! 'lang_done' =>
lang('Done'),
! 'lang_done_statustext' => lang('Close this
window')
! );
!
! $link_data = array
! (
! 'menuaction' =>
$this->currentapp.'.uiinvoice.list_sub',
! 'order' => $this->order,
! 'sort' => $this->sort,
! 'cat_id' =>
$this->cat_id,
! 'user_lid' =>
$this->user_lid,
! 'sub' => $this->sub,
! 'query' => $this->query,
! 'start' => $this->start,
! 'voucher_id' => $voucher_id
! );
!
! $data = array
! (
! 'message'
=> $receipt['message'],
! 'error'
=> $receipt['error'],
! 'overlib_source'
=> './'.$this->currentapp.'/inc/overlib.js',
! 'form_action'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
! 'lang_save'
=> lang('save'),
! 'done_action'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiinvoice.index'),
! 'lang_done_statustext' =>
lang('Back to the list'),
! 'lang_save_statustext' =>
lang('Save the voucher'),
! 'links'
=> $links,
! 'allow_all_rows'
=> false,
! 'start_record'
=> $this->start,
! 'record_limit'
=>
count($content),//$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'],
! 'num_records'
=> count($content),
! 'all_records'
=> $this->bo->total_records,
! 'link_url'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
! 'img_path'
=> $GLOBALS['phpgw']->common->get_image_path('phpgwapi'),
! 'appname'
=> lang($this->currentapp),
! 'function_msg'
=> lang('list invoice'),
! 'lang_submit'
=> lang('submit'),
! 'table_header_list_invoice_sub' =>
$table_header,
! 'values_list_invoice_sub'
=> $content,
! 'table_done'
=> $table_done
! );
!
! //_debug_array($data);
!
!
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list_invoice_sub' => $data));
$this->save_sessiondata();
}
***************
*** 228,236 ****
$GLOBALS['phpgw']->xslttpl->add_file(array('invoice',
!
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'app_header',
!
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
!
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'search_field'));
! $invoice_id =
get_var('invoice_id',array('POST','GET'));
$period =
get_var('period',array('POST','GET'));
$submit =
get_var('submit',array('POST','GET'));
--- 390,396 ----
$GLOBALS['phpgw']->xslttpl->add_file(array('invoice',
!
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'app_header'));
! $voucher_id =
get_var('voucher_id',array('POST','GET'));
$period =
get_var('period',array('POST','GET'));
$submit =
get_var('submit',array('POST','GET'));
***************
*** 238,242 ****
if($submit)
{
! $message =
$this->bo->update_period($invoice_id,$period);
}
--- 398,402 ----
if($submit)
{
! $message =
$this->bo->update_period($voucher_id,$period);
}
***************
*** 244,248 ****
(
'menuaction' =>
$this->currentapp.'.uiinvoice.edit_period',
! 'invoice_id' => $invoice_id);
--- 404,408 ----
(
'menuaction' =>
$this->currentapp.'.uiinvoice.edit_period',
! 'voucher_id' => $voucher_id);
***************
*** 259,262 ****
--- 419,441 ----
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('edit_period' => $data));
+ }
+
+ function remark()
+ {
+ $GLOBALS['phpgw_info']['flags']['headonly'] = True;
+
+ $GLOBALS['phpgw']->xslttpl->add_file(array('invoice',
+
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'app_header'));
+
+ $id = get_var('id',array('POST','GET'));
+
+ $data = array
+ (
+ 'remark' => $this->bo->read_remark($id)
+ );
+
+ //_debug_array($data);
+
+
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('remark' => $data));
}
Index: class.uiXport.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiXport.inc.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** class.uiXport.inc.php 11 Jan 2003 18:55:43 -0000 1.12
--- class.uiXport.inc.php 14 Jan 2003 19:20:09 -0000 1.13
***************
*** 262,269 ****
'function_msg'
=> $function_msg,
'form_action'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
! 'cancel_action'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uibuilding.index'),
'lang_cancel'
=> lang('Cancel'),
'lang_cancel_statustext' =>
lang('cancel the import'),
- 'cancel_url'
=> $GLOBALS['phpgw']->link('/property/list_invoice.php','sub=p_invoice'),
'function_msg'
=> lang('Import from CSV'),
'action_url'
=> $GLOBALS['phpgw']->link('/index.php','menuaction=property.uiXport.import'),
--- 262,268 ----
'function_msg'
=> $function_msg,
'form_action'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
! 'cancel_action'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiinvoice.index&sub='.$sub),
'lang_cancel'
=> lang('Cancel'),
'lang_cancel_statustext' =>
lang('cancel the import'),
'function_msg'
=> lang('Import from CSV'),
'action_url'
=> $GLOBALS['phpgw']->link('/index.php','menuaction=property.uiXport.import'),
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: property/inc class.boinvoice.inc.php,1.5,1.6 class.soinvoice.inc.php,1.5,1.6 class.uiinvoice.inc.php,1.5,1.6 class.uiXport.inc.php,1.12,1.13,
Sigurd Nes <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: property/templates/default/images check.gif,1.2,1.3 check.png,1.2,1.3
- Next by Date:
[Phpgroupware-cvs] CVS: property/setup tables_current.inc.php,1.21,1.22
- Previous by thread:
[Phpgroupware-cvs] CVS: property/templates/default/images check.gif,1.2,1.3 check.png,1.2,1.3
- Next by thread:
[Phpgroupware-cvs] CVS: property/setup tables_current.inc.php,1.21,1.22
- Index(es):