[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: property/inc check.js,1.1,1.2 class.boinvoice.i
From: |
Sigurd Nes <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: property/inc check.js,1.1,1.2 class.boinvoice.inc.php,1.6,1.7 class.soinvoice.inc.php,1.6,1.7 class.uiinvoice.inc.php,1.6,1.7 class.uilookup.inc.php,1.3,1.4 class.uiXport.inc.php,1.13,1.14 |
Date: |
Wed, 15 Jan 2003 15:55:50 -0500 |
Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv11539/inc
Modified Files:
check.js class.boinvoice.inc.php class.soinvoice.inc.php
class.uiinvoice.inc.php class.uilookup.inc.php
class.uiXport.inc.php
Log Message:
no message
Index: check.js
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/check.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** check.js 14 Jan 2003 19:20:58 -0000 1.1
--- check.js 15 Jan 2003 20:55:46 -0000 1.2
***************
*** 17,28 ****
if (document.form.elements[i].type == "checkbox" &&
document.form.elements[i].name.substring(0,which.length) == which)
{
! // if (document.form.elements[i].checked)
! // {
! // document.form.elements[i].checked = false;
! // }
! // else
! // {
document.form.elements[i].checked = true;
! // }
}
}
--- 17,28 ----
if (document.form.elements[i].type == "checkbox" &&
document.form.elements[i].name.substring(0,which.length) == which)
{
! if (document.form.elements[i].checked)
! {
! document.form.elements[i].checked = false;
! }
! else
! {
document.form.elements[i].checked = true;
! }
}
}
Index: class.boinvoice.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boinvoice.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** class.boinvoice.inc.php 14 Jan 2003 19:20:09 -0000 1.6
--- class.boinvoice.inc.php 15 Jan 2003 20:55:46 -0000 1.7
***************
*** 135,155 ****
$errorcount = 0;
! while (is_array($values) && list(,$entry) =
each($values))
{
$local_error='';
//_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;
}
--- 135,162 ----
$errorcount = 0;
! // while (is_array($values) && list(,$entry) =
each($values))
! // {
! // $local_error='';
! while($entry=each($values['counter']))
{
$local_error='';
+ $n=$entry[0];
+
+
+
//_debug_array($entry);
! if($values['voucher_id'][$n])
{
! $voucher_id=$values['voucher_id'][$n];
$check_count =
$this->so->check_count($voucher_id);
! if (!($check_count['dima_count'] ==
$values['invoice_count'][$n]))
{
! $error[$errorcount++] =
array('msg'=>lang('Dima is missing from sub invoice in:'). "
".$values['voucher_id'][$n]);
$local_error= true;
}
***************
*** 157,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;
}
--- 164,170 ----
! if
(!($check_count['spbudact_code_count'] == $values['invoice_count'][$n]))
{
! $error[$errorcount++] =
array('msg'=>lang('Budget code is missing from sub invoice in :'). "
".$values['voucher_id'][$n]);
$local_error= true;
}
***************
*** 174,178 ****
$user_lid
=strtoupper($GLOBALS['phpgw_info']['user']['account_lid']);
! if (($entry['sign']=='sign_none') &&
($entry['sign_orig']=='janitor')):
$blank_date = 'oppsynsigndato=
NULL';
$sign_field='';
--- 181,185 ----
$user_lid
=strtoupper($GLOBALS['phpgw_info']['user']['account_lid']);
! if (($values['sign'][$n]=='sign_none')
&& ($values['sign_orig'][$n]=='janitor')):
$blank_date = 'oppsynsigndato=
NULL';
$sign_field='';
***************
*** 181,185 ****
$sign_date='';
$kommma='';
! elseif (($entry['sign']=='sign_none')
&& ($entry['sign_orig']=='supervisor')):
$blank_date = 'saksigndato=
NULL';
$sign_field='';
--- 188,192 ----
$sign_date='';
$kommma='';
! elseif
(($values['sign'][$n]=='sign_none') &&
($values['sign_orig'][$n]=='supervisor')):
$blank_date = 'saksigndato=
NULL';
$sign_field='';
***************
*** 188,192 ****
$sign_date='';
$kommma='';
! elseif (($entry['sign']=='sign_none')
&& ($entry['sign_orig']=='budget_responsible')):
$blank_date =
'budsjettsigndato= NULL';
$sign_field='';
--- 195,199 ----
$sign_date='';
$kommma='';
! elseif
(($values['sign'][$n]=='sign_none') &&
($values['sign_orig'][$n]=='budget_responsible')):
$blank_date =
'budsjettsigndato= NULL';
$sign_field='';
***************
*** 195,199 ****
$sign_date='';
$kommma='';
! elseif ($entry['sign']=='sign_janitor'
&& !$entry['sign_orig']):
$blank_date = '';
$sign_field = 'oppsynsmannid=';
--- 202,206 ----
$sign_date='';
$kommma='';
! elseif
($values['sign'][$n]=='sign_janitor' && !$values['sign_orig'][$n]):
$blank_date = '';
$sign_field = 'oppsynsmannid=';
***************
*** 202,206 ****
$sign_date="'" .
date($this->bocommon->datetimeformat) . "'";
$kommma=",";
! elseif ($entry['sign']=='sign_janitor'
&& $entry['sign_orig']=='supervisor'):
$blank_date = 'saksigndato=
NULL';
$sign_field = 'oppsynsmannid=';
--- 209,213 ----
$sign_date="'" .
date($this->bocommon->datetimeformat) . "'";
$kommma=",";
! elseif
($values['sign'][$n]=='sign_janitor' && $values['sign_orig'][$n]=='supervisor'):
$blank_date = 'saksigndato=
NULL';
$sign_field = 'oppsynsmannid=';
***************
*** 209,213 ****
$sign_date="'" .
date($this->bocommon->datetimeformat) . "'";
$kommma=",";
! elseif ($entry['sign']=='sign_janitor'
&& $entry['sign_orig']=='budget_responsible'):
$blank_date =
'budsjettsigndato= NULL';
$sign_field = 'oppsynsmannid=';
--- 216,220 ----
$sign_date="'" .
date($this->bocommon->datetimeformat) . "'";
$kommma=",";
! elseif
($values['sign'][$n]=='sign_janitor' &&
$values['sign_orig'][$n]=='budget_responsible'):
$blank_date =
'budsjettsigndato= NULL';
$sign_field = 'oppsynsmannid=';
***************
*** 216,220 ****
$sign_date="'" .
date($this->bocommon->datetimeformat) . "'";
$kommma=",";
! elseif
($entry['sign']=='sign_supervisor' && !$entry['sign_orig']):
$blank_date = '';
$sign_field =
'saksbehandlerid=';
--- 223,227 ----
$sign_date="'" .
date($this->bocommon->datetimeformat) . "'";
$kommma=",";
! elseif
($values['sign'][$n]=='sign_supervisor' && !$values['sign_orig'][$n]):
$blank_date = '';
$sign_field =
'saksbehandlerid=';
***************
*** 223,227 ****
$sign_date="'" .
date($this->bocommon->datetimeformat) . "'";
$kommma=",";
! elseif
($entry['sign']=='sign_supervisor' && $entry['sign_orig']=='janitor'):
$blank_date = 'oppsynsigndato=
NULL';
$sign_field =
'saksbehandlerid=';
--- 230,234 ----
$sign_date="'" .
date($this->bocommon->datetimeformat) . "'";
$kommma=",";
! elseif
($values['sign'][$n]=='sign_supervisor' && $values['sign_orig'][$n]=='janitor'):
$blank_date = 'oppsynsigndato=
NULL';
$sign_field =
'saksbehandlerid=';
***************
*** 230,234 ****
$sign_date="'" .
date($this->bocommon->datetimeformat) . "'";
$kommma=",";
! elseif
($entry['sign']=='sign_supervisor' &&
$entry['sign_orig']=='budget_responsible'):
$blank_date =
'budsjettsigndato= NULL';
$sign_field =
'saksbehandlerid=';
--- 237,241 ----
$sign_date="'" .
date($this->bocommon->datetimeformat) . "'";
$kommma=",";
! elseif
($values['sign'][$n]=='sign_supervisor' &&
$values['sign_orig'][$n]=='budget_responsible'):
$blank_date =
'budsjettsigndato= NULL';
$sign_field =
'saksbehandlerid=';
***************
*** 237,241 ****
$sign_date="'" .
date($this->bocommon->datetimeformat) . "'";
$kommma=",";
! elseif
($entry['sign']=='sign_budget_responsible' && $entry['sign_orig']=='janitor'):
$blank_date = 'oppsynsigndato=
NULL';
$sign_field =
'budsjettansvarligid=';
--- 244,248 ----
$sign_date="'" .
date($this->bocommon->datetimeformat) . "'";
$kommma=",";
! elseif
($values['sign'][$n]=='sign_budget_responsible' &&
$values['sign_orig'][$n]=='janitor'):
$blank_date = 'oppsynsigndato=
NULL';
$sign_field =
'budsjettansvarligid=';
***************
*** 244,248 ****
$sign_date="'" .
date($this->bocommon->datetimeformat) . "'";
$kommma=",";
! elseif
($entry['sign']=='sign_budget_responsible' &&
$entry['sign_orig']=='supervisor'):
$blank_date = 'saksigndato=
NULL';
$sign_field =
'budsjettansvarligid=';
--- 251,255 ----
$sign_date="'" .
date($this->bocommon->datetimeformat) . "'";
$kommma=",";
! elseif
($values['sign'][$n]=='sign_budget_responsible' &&
$values['sign_orig'][$n]=='supervisor'):
$blank_date = 'saksigndato=
NULL';
$sign_field =
'budsjettansvarligid=';
***************
*** 251,255 ****
$sign_date="'" .
date($this->bocommon->datetimeformat) . "'";
$kommma=",";
! elseif
($entry['sign']=='sign_budget_responsible' && !$entry['sign_orig']):
$blank_date = '';
$sign_field =
'budsjettansvarligid=';
--- 258,262 ----
$sign_date="'" .
date($this->bocommon->datetimeformat) . "'";
$kommma=",";
! elseif
($values['sign'][$n]=='sign_budget_responsible' && !$values['sign_orig'][$n]):
$blank_date = '';
$sign_field =
'budsjettansvarligid=';
***************
*** 273,283 ****
$transfer_date_field='utbetalingsigndato=';
! 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'");
}
! if ($entry['transfer'])
{
--- 280,290 ----
$transfer_date_field='utbetalingsigndato=';
! if
(!($values['num_days_orig'][$n]==$values['num_days'][$n]))
{
! $payment_date =
date($this->bocommon->dateformat,$values['timestamp_voucher_date'][$n]+(24*3600*$values['num_days'][$n]));
$GLOBALS['phpgw']->db->query("update t_ecobilag set forfallsdato=
'$payment_date' where bilagsnr='$voucher_id'");
}
! if ($values['transfer'][$n])
{
***************
*** 291,295 ****
}
! if ($entry['kreditnota'])
{
$wait_for_kreditnota=1;
--- 298,302 ----
}
! if ($values['kreditnota'][$n])
{
$wait_for_kreditnota=1;
Index: class.soinvoice.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soinvoice.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** class.soinvoice.inc.php 14 Jan 2003 19:20:09 -0000 1.6
--- class.soinvoice.inc.php 15 Jan 2003 20:55:46 -0000 1.7
***************
*** 275,287 ****
$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");
--- 275,292 ----
$GLOBALS['phpgw']->db->transaction_begin();
!
! while($entry=each($values['counter']))
! {
! $local_error='';
!
! $n=$entry[0];
!
!
//_debug_array($entry);
! if ($values['budget_account'][$n])
{
!
$budget_account=$values['budget_account'][$n];
$GLOBALS['phpgw']->db->query("select
count(*) from fm_wo_accounts where id =$budget_account");
***************
*** 299,303 ****
}
! if(!$entry['dimd'])
{
$dimd_field="dimd=NULL";
--- 304,308 ----
}
! if(!$values['dimd'][$n])
{
$dimd_field="dimd=NULL";
***************
*** 305,309 ****
else
{
! $dimd=$entry['dimd'];
$GLOBALS['phpgw']->db->query("select
count(*) from fm_wo_dim_d where id =$dimd");
$GLOBALS['phpgw']->db->next_record();
--- 310,314 ----
else
{
! $dimd=$values['dimd'][$n];
$GLOBALS['phpgw']->db->query("select
count(*) from fm_wo_dim_d where id =$dimd");
$GLOBALS['phpgw']->db->next_record();
***************
*** 317,321 ****
}
! if (!$entry['dima'])
{
$dima_field="dima=NULL";
--- 322,326 ----
}
! if (!$values['dima'][$n])
{
$dima_field="dima=NULL";
***************
*** 325,338 ****
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'] . "'";
}
--- 330,343 ----
else
{
!
$dima_check=substr($values['dima'][$n],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:'). " ".$values['dima'][$n]);
$local_error= true;
}
! settype($values['dima'][$n],"int");
! $dima_field="dima="."'" .
$values['dima'][$n] . "'";
}
***************
*** 341,353 ****
{
! $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'");
--- 346,358 ----
{
! $id =
$values['id'][$n];
! $tax_code =
$values['tax_code'][$n];
!
$workorder_id=$values['workorder_id'][$n];
! if($values['close_order'][$n])
{
$GLOBALS['phpgw']->db->query("update fm_wo_wrkorders set status='closed' where
id='$workorder_id'");
}
! if(!$values['close_order'][$n] &&
$values['close_order_orig'][$n])
{
$GLOBALS['phpgw']->db->query("update fm_wo_wrkorders set status='re_opened'
where id='$workorder_id'");
Index: class.uiinvoice.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiinvoice.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** class.uiinvoice.inc.php 14 Jan 2003 19:20:09 -0000 1.6
--- class.uiinvoice.inc.php 15 Jan 2003 20:55:46 -0000 1.7
***************
*** 82,86 ****
$values = get_var('values',array('POST','GET'));
! if($values[0]['save'])
{
$receipt=$this->bo->update_invoice($values);
--- 82,86 ----
$values = get_var('values',array('POST','GET'));
! if($values['save'][0] && $values['counter'])
{
$receipt=$this->bo->update_invoice($values);
***************
*** 88,93 ****
}
! //_debug_array($receipt);
!
$content = $this->bo->read_invoice();
--- 88,92 ----
}
! //_debug_array($values);
$content = $this->bo->read_invoice();
***************
*** 189,192 ****
--- 188,192 ----
'lang_done_statustext' =>
lang('Back to the list'),
'lang_save_statustext' =>
lang('Save the voucher'),
+ 'lang_select_all'
=> lang('Select All'),
'links'
=> $links,
'allow_all_rows'
=> false,
***************
*** 238,242 ****
$voucher_id =
get_var('voucher_id',array('POST','GET'));
! if($values[0]['save'])
{
$receipt=$this->bo->update_invoice_sub($values);
--- 238,242 ----
$voucher_id =
get_var('voucher_id',array('POST','GET'));
! if($values['save'][0] && $values['counter'])
{
$receipt=$this->bo->update_invoice_sub($values);
***************
*** 387,395 ****
function edit_period()
{
- $GLOBALS['phpgw_info']['flags']['headonly'] = True;
-
$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'));
--- 387,396 ----
function edit_period()
{
$GLOBALS['phpgw']->xslttpl->add_file(array('invoice',
+
'headonly',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'app_header'));
+
//$GLOBALS['phpgw']->xslttpl->add_file($this->get_tpl_dir('phpgwapi','default')
. SEP . 'phpgw_header');
+
$voucher_id =
get_var('voucher_id',array('POST','GET'));
$period =
get_var('period',array('POST','GET'));
***************
*** 400,404 ****
$message =
$this->bo->update_period($voucher_id,$period);
}
!
$link_data = array
(
--- 401,408 ----
$message =
$this->bo->update_period($voucher_id,$period);
}
! else
! {
! $message = lang('Edit period');
! }
$link_data = array
(
***************
*** 423,429 ****
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'));
--- 427,432 ----
function remark()
{
$GLOBALS['phpgw']->xslttpl->add_file(array('invoice',
+
'headonly',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'app_header'));
Index: class.uilookup.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uilookup.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** class.uilookup.inc.php 2 Jan 2003 22:03:57 -0000 1.3
--- class.uilookup.inc.php 15 Jan 2003 20:55:46 -0000 1.4
***************
*** 71,74 ****
--- 71,75 ----
$GLOBALS['phpgw']->xslttpl->add_file(array('lookup',
'nextmatchs',
+
'headonly',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'app_header',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
***************
*** 155,159 ****
'link_url'
=> $GLOBALS['phpgw']->link('/index.php',$link_select),
'img_path'
=> $GLOBALS['phpgw']->common->get_image_path('phpgwapi'),
! 'appname'
=> lang($this->currentapp),
'function_msg'
=> lang('list vendors'),
'lang_no_cat'
=> lang('no category'),
--- 156,160 ----
'link_url'
=> $GLOBALS['phpgw']->link('/index.php',$link_select),
'img_path'
=> $GLOBALS['phpgw']->common->get_image_path('phpgwapi'),
! // 'appname'
=> '',
'function_msg'
=> lang('list vendors'),
'lang_no_cat'
=> lang('no category'),
***************
*** 182,185 ****
--- 183,187 ----
$GLOBALS['phpgw']->xslttpl->add_file(array('lookup',
'nextmatchs',
+
'headonly',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'app_header',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
***************
*** 273,277 ****
'link_url'
=> $GLOBALS['phpgw']->link('/index.php',$link_select),
'img_path'
=> $GLOBALS['phpgw']->common->get_image_path('phpgwapi'),
! 'appname'
=> lang($this->currentapp),
'function_msg'
=> lang('list property'),
'lang_no_cat'
=> lang('no category'),
--- 275,279 ----
'link_url'
=> $GLOBALS['phpgw']->link('/index.php',$link_select),
'img_path'
=> $GLOBALS['phpgw']->common->get_image_path('phpgwapi'),
! // 'appname'
=> lang($this->currentapp),
'function_msg'
=> lang('list property'),
'lang_no_cat'
=> lang('no category'),
***************
*** 305,308 ****
--- 307,311 ----
$GLOBALS['phpgw']->xslttpl->add_file(array('lookup',
'nextmatchs',
+
'headonly',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'app_header',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'filter_select',
***************
*** 397,401 ****
'link_url'
=> $GLOBALS['phpgw']->link('/index.php',$link_select),
'img_path'
=> $GLOBALS['phpgw']->common->get_image_path('phpgwapi'),
! 'appname'
=> lang($this->currentapp),
'function_msg'
=> lang('list equipment'),
'lang_no_cat'
=> lang('no category'),
--- 400,404 ----
'link_url'
=> $GLOBALS['phpgw']->link('/index.php',$link_select),
'img_path'
=> $GLOBALS['phpgw']->common->get_image_path('phpgwapi'),
! // 'appname'
=> lang($this->currentapp),
'function_msg'
=> lang('list equipment'),
'lang_no_cat'
=> lang('no category'),
Index: class.uiXport.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiXport.inc.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** class.uiXport.inc.php 14 Jan 2003 19:20:09 -0000 1.13
--- class.uiXport.inc.php 15 Jan 2003 20:55:46 -0000 1.14
***************
*** 44,48 ****
{
- //echo $tsvfile;
$art =
get_var('art',array('POST','GET'));
$type =
get_var('type',array('POST','GET'));
--- 44,47 ----
***************
*** 60,64 ****
$cancel =
get_var('cancel',array('POST','GET'));
$convert =
get_var('convert',array('POST','GET'));
- $tsvfile =
get_var('tsvfile',array('POST','GET'));
$conv_type =
get_var('conv_type',array('POST','GET'));
$sday =
get_var('sday',array('POST','GET'));
--- 59,62 ----
***************
*** 70,76 ****
--- 68,77 ----
$download =
get_var('download',array('POST','GET'));
+ global $tsvfile;
+
$sub = get_var('sub',array('POST','GET'));
$links = $this->bocommon->menu($sub);
+ //echo 'tsvfile: '.$tsvfile.'<br>';
***************
*** 78,82 ****
if ($cancel && $tsvfile)
{
! // unlink ($tsvfile);
}
--- 79,83 ----
if ($cancel && $tsvfile)
{
! unlink ($tsvfile);
}
***************
*** 180,183 ****
--- 181,189 ----
}
+ $old = $tsvfile;
+ $tsvfile =
$GLOBALS['phpgw_info']['server']['temp_dir'].'/invoice_import_'.basename($tsvfile);
+ //echo 'tsvfile: '.$tsvfile.'<br>';
+ rename($old,$tsvfile);
+
$invoice_common=array(
'bilagsnr'
=> $this->invoice->next_bilagsnr(),
***************
*** 205,221 ****
);
-
-
-
//_debug_array($invoice_common);
! // $old = $tsvfile;
! // $tsvfile =
$GLOBALS['phpgw_info']['server']['temp_dir'].'/invoice_import_'.basename($tsvfile);
! //echo $tsvfile;
! // rename($old,$tsvfile);
$buffer =
$this->bo->import($invoice_common,$download);
if(!$download)
{
! // unlink ($tsvfile);
$message = $buffer;
}
--- 211,221 ----
);
//_debug_array($invoice_common);
!
$buffer =
$this->bo->import($invoice_common,$download);
if(!$download)
{
! unlink ($tsvfile);
$message = $buffer;
}
***************
*** 636,779 ****
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('rollback' => $data));
- }
-
-
-
-
- function export_org()
- {
- // global
$values['convert'],$tsvfilename,$values['download'],$values['conv_type'],$rollback_file,$role_back_date;
-
- if ($values['convert'])
- {
- // echo 'conv_type: '.$values['conv_type'] .'<br>';
- // echo 'rollback_file: '.$rollback_file .'<br>';
-
- if (($values['conv_type'] == 'none') &&
($rollback_file=='none') ):
- {
-
$GLOBALS['phpgw_info']['flags']['noheader'] = False;
-
$GLOBALS['phpgw_info']['flags']['noheader'] = True;
-
$GLOBALS['phpgw']->common->phpgw_header();
- echo parse_navbar();
- echo lang('<b>No conversion type
<none> could be located.</b> Please choose a conversion type from the
list');
- echo ' <a
href="'.$GLOBALS['phpgw']->link('/index.php','menuaction=property.uiXport.export')
. '">' . lang('OK') . '</a>';
-
$GLOBALS['phpgw']->common->phpgw_footer();
- $GLOBALS['phpgw']->common->phpgw_exit();
- }
- elseif(!($values['conv_type'] == 'none') &&
($rollback_file=='none')):
- {
- $buffer =
$this->bo->export($values['conv_type'],$values['download']);
- }
- elseif(!($values['conv_type'] == 'none') &&
!($rollback_file=='none')):
- {
- //$buffer='RullTilbake';
- $buffer =
$this->bo->rollback($values['conv_type'],$rollback_file,$role_back_date);
- }
- elseif(($values['conv_type'] == 'none') &&
!($rollback_file=='none')):
- {
- $buffer=lang('Please choose a
conversion type');
- }
- endif;
-
- $GLOBALS['phpgw']->common->phpgw_header();
- echo parse_navbar();
- echo "<pre>\n";
- echo $buffer;
- echo "\n</pre>\n";
- echo '<a
href="'.$GLOBALS['phpgw']->link('/index.php','menuaction=property.uiXport.export')
. '">' . lang('OK') . '</a>';
- // $GLOBALS['phpgw']->common->phpgw_footer();
- }
- else
- {
- $GLOBALS['phpgw']->common->phpgw_header();
- echo parse_navbar();
-
- //set_time_limit(0);
-
- $this->template->set_file(array('export' =>
'export.tpl'));
-
- $dir_handle = opendir(PHPGW_APP_INC. SEP .
'export');
- $i=0; $myfilearray = '';
- while ($file = readdir($dir_handle))
- {
- if ((substr($file, 0, 1) != '.') &&
is_file(PHPGW_APP_INC . SEP . 'export' . SEP . $file) )
- {
- $myfilearray[$i] = $file;
- $i++;
- }
- }
- closedir($dir_handle);
- sort($myfilearray);
- for ($i=0;$i<count($myfilearray);$i++)
- {
- $fname = ereg_replace('_','
',$myfilearray[$i]);
- $conv .= ' <option
value="'.$myfilearray[$i].'">'.$fname.'</option>'."\n";
- }
- //----------------
- $this->$config->read_repository();
- $fil_katalog =
$this->$config->config_data['export_path'];
- // echo 'fil_katalog: '.$fil_katalog .'<br>';
-
- $dir_handle = opendir($fil_katalog);
- $i=0; $myfilearray = '';
- while ($file = readdir($dir_handle))
- {
- if ((substr($file, 0, 1) != '.') &&
is_file($fil_katalog . SEP . $file) )
- {
- $myfilearray[$i] = $file;
- $i++;
- }
- }
- closedir($dir_handle);
- @sort($myfilearray);
- for ($i=0;$i<count($myfilearray);$i++)
- {
- $fname = ereg_replace('_','
',$myfilearray[$i]);
- $rollback_file_name .= ' <option
value="'.$myfilearray[$i].'">'.$fname.'</option>'."\n";
- }
- //----------------
-
-
$this->template->set_var('lang_cancel',lang('Cancel'));
-
$this->template->set_var('lang_cat',lang('Select Category'));
-
$this->template->set_var('cancel_url',$GLOBALS['phpgw']->link('/property/index.php'));
-
$this->template->set_var('navbar_bg',$GLOBALS['phpgw_info']['theme']['navbar_bg']);
-
$this->template->set_var('navbar_text',$GLOBALS['phpgw_info']['theme']['navbar_text']);
-
$this->template->set_var('export_text',lang('Export to accounting system'));
-
$this->template->set_var('action_url',$GLOBALS['phpgw']->link('/index.php','menuaction=property.uiXport.export'));
-
$this->template->set_var('filename',lang('rollback file name'));
-
$this->template->set_var('lang_date',lang('rollback date'));
-
$this->template->set_var('lang_popup_calendar',lang('Calendar'));
-
$this->template->set_var('lang_select_conversion',lang('Select the type of
conversion'));
-
$this->template->set_var('lang_export_to_file',lang('Export to file (Uncheck to
debug output in browser)'));
-
-
- $this->template->set_var('conv',$conv);
-
$this->template->set_var('rollback_file_name',$rollback_file_name);
- $this->template->set_var('debug',lang(''));
- $this->template->set_var('download',lang('Ok'));
- $this->template->set_var('start',$this->start);
- $this->template->set_var('sort',$this->sort);
- $this->template->set_var('order',$this->order);
-
$this->template->set_var('filter',$this->filter);
- $this->template->set_var('query',$this->query);
-
$this->template->set_var('cat_id',$this->cat_id);
-
- $dateformat =
strtolower($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
- $sep = '/';
- $dlarr[strpos($dateformat,'y')] = 'yyyy';
- $dlarr[strpos($dateformat,'m')] = 'MM';
- $dlarr[strpos($dateformat,'d')] = 'DD';
- ksort($dlarr);
-
- $dateformat= (implode($sep,$dlarr));
-
$this->template->set_var('dateformat',$dateformat);
- $start_dateout =
$GLOBALS['phpgw']->common->show_date(mktime(0,0,0,date("m"),date("d"),date("Y")),$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
-
$this->template->set_var('start_date',$start_dateout);
-
-
- $this->template->pparse('out','export');
-
- // $GLOBALS['phpgw']->common->phpgw_footer();
- }
}
}
--- 636,639 ----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: property/inc check.js,1.1,1.2 class.boinvoice.inc.php,1.6,1.7 class.soinvoice.inc.php,1.6,1.7 class.uiinvoice.inc.php,1.6,1.7 class.uilookup.inc.php,1.3,1.4 class.uiXport.inc.php,1.13,1.14,
Sigurd Nes <address@hidden> <=