[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: property/inc class.boXport.inc.php,1.5,1.6 class
From: |
Sigurd Nes <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: property/inc class.boXport.inc.php,1.5,1.6 class.soXport.inc.php,1.11,1.12 class.uiinvoice.inc.php,1.3,1.4 class.uiXport.inc.php,1.9,1.10 |
Date: |
Thu, 09 Jan 2003 14:41:43 -0500 |
Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv11133/inc
Modified Files:
class.boXport.inc.php class.soXport.inc.php
class.uiinvoice.inc.php class.uiXport.inc.php
Log Message:
no message
Index: class.boXport.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boXport.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** class.boXport.inc.php 27 Dec 2002 19:03:27 -0000 1.5
--- class.boXport.inc.php 9 Jan 2003 19:41:40 -0000 1.6
***************
*** 35,40 ****
function boXport ($session=False)
{
! $this->contacts = $GLOBALS['phpgw']->contacts;
! $this->so = CreateObject('addressbook.soaddressbook');
if($session)
--- 35,42 ----
function boXport ($session=False)
{
! $this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
! $this->contacts = $GLOBALS['phpgw']->contacts;
! $this->so =
CreateObject('addressbook.soaddressbook');
! $this->config =
CreateObject('phpgwapi.config',$this->currentapp);
if($session)
***************
*** 88,92 ****
}
! function select_conv($selected='')
{
$dir_handle = opendir(PHPGW_APP_INC . SEP . 'import');
--- 90,94 ----
}
! function select_import_conv($selected='')
{
$dir_handle = opendir(PHPGW_APP_INC . SEP . 'import');
***************
*** 132,135 ****
--- 134,230 ----
}
+ function select_export_conv($selected='')
+ {
+ $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]);
+ $sel_file = '';
+ if ($myfilearray[$i]==$selected)
+ {
+ $sel_file = 'selected';
+ }
+
+ $conv_list[] = array
+ (
+ 'id' => $myfilearray[$i],
+ 'name' => $fname,
+ 'selected' => $sel_file
+ );
+ }
+
+ for ($i=0;$i<count($conv_list);$i++)
+ {
+ if ($conv_list[$i]['selected'] != 'selected')
+ {
+ unset($conv_list[$i]['selected']);
+ }
+ }
+
+ return $conv_list;
+
+ }
+
+ function select_rollback_file($selected='')
+ {
+ $this->config->read_repository();
+ $file_catalog =
$this->config->config_data['export_path'];
+ // echo 'file_catalog: '.$file_catalog .'<br>';
+
+ $dir_handle = opendir($file_catalog);
+ $i=0; $myfilearray = '';
+ while ($file = readdir($dir_handle))
+ {
+ if ((substr($file, 0, 1) != '.') &&
is_file($file_catalog . SEP . $file) )
+ {
+ $myfilearray[$i] = $file;
+ $i++;
+ }
+ }
+ closedir($dir_handle);
+ sort($myfilearray);
+
+ for ($i=0;$i<count($myfilearray);$i++)
+ {
+ $fname = ereg_replace('_',' ',$myfilearray[$i]);
+ $sel_file = '';
+ if ($myfilearray[$i]==$selected)
+ {
+ $sel_file = 'selected';
+ }
+
+ $rollback_list[] = array
+ (
+ 'id' => $myfilearray[$i],
+ 'name' => $fname,
+ 'selected' => $sel_file
+ );
+ }
+
+ for ($i=0;$i<count($rollback_list);$i++)
+ {
+ if ($rollback_list[$i]['selected'] !=
'selected')
+ {
+ unset($rollback_list[$i]['selected']);
+ }
+ }
+
+ //_debug_array($rollback_list);
+ return $rollback_list;
+
+ }
+
function import($invoice_common,$download)
***************
*** 210,213 ****
--- 305,310 ----
function export($conv_type,$download)
{
+ echo 'download ' . $download.'<br>';
+
include (PHPGW_APP_INC . '/export/' . $conv_type);
// $buffer=array();
***************
*** 221,229 ****
}
! function roleback($conv_type,$role_back_date,$roleback_file)
{
include (PHPGW_APP_INC . '/export/' . $conv_type);
$invoice = new export_conv;
! $buffer =
$invoice->RullTilbake($role_back_date,$roleback_file);
return $buffer;
--- 318,326 ----
}
! function rollback($conv_type,$role_back_date,$rollback_file)
{
include (PHPGW_APP_INC . '/export/' . $conv_type);
$invoice = new export_conv;
! $buffer =
$invoice->RullTilbake($role_back_date,$rollback_file);
return $buffer;
Index: class.soXport.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soXport.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** class.soXport.inc.php 6 Jan 2003 16:51:12 -0000 1.11
--- class.soXport.inc.php 9 Jan 2003 19:41:41 -0000 1.12
***************
*** 223,231 ****
$merknad=$fields['merknad'];
! $belop=$this->bocommon->moneyformat($belop);
!
$godkjentbelop=$this->bocommon->moneyformat($godkjentbelop);
! $sql= "INSERT INTO t_ecobilag
(pmwrkord_code,bilagsnr,splitt,kildeid,kidnr,typeid,fakturadato,forfallsdato,regtid,artid,godkjentbelop,spvend_code,dimb,oppsynsmannid,saksbehandlerid,budsjettansvarligid,fakturanr,spbudact_code,dima,dimd,mvakode,belop,periode,merknad)"
! . " values
($pmwrkord_code_value,'$bilagsnr','$splitt','$kildeid','$kidnr','$typeid','$fakturadato','$forfallsdato','$regtid','$artid',$godkjentbelop,'$spvend_code',$dimb_value,$oppsynsmannid_value,$saksbehandlerid_value,'$budsjettansvarligid','$fakturanr',$spbudact_code_value,'$dima',$dimd_value,'$mvakode',$belop,'$periode','$merknad')";
//echo 'sql'.$sql.'<br>';
--- 223,234 ----
$merknad=$fields['merknad'];
! if(abs($belop)>0)
! {
! $belop=$this->bocommon->moneyformat($belop);
!
$godkjentbelop=$this->bocommon->moneyformat($godkjentbelop);
! $sql= "INSERT INTO t_ecobilag
(pmwrkord_code,bilagsnr,splitt,kildeid,kidnr,typeid,fakturadato,forfallsdato,regtid,artid,godkjentbelop,spvend_code,dimb,oppsynsmannid,saksbehandlerid,budsjettansvarligid,fakturanr,spbudact_code,dima,dimd,mvakode,belop,periode,merknad,oppsynsigndato,saksigndato,budsjettsigndato,utbetalingsigndato)"
! . " values
($pmwrkord_code_value,'$bilagsnr','$splitt','$kildeid','$kidnr','$typeid','$fakturadato','$forfallsdato','$regtid','$artid',$godkjentbelop,'$spvend_code',$dimb_value,$oppsynsmannid_value,$saksbehandlerid_value,'$budsjettansvarligid','$fakturanr',$spbudact_code_value,'$dima',$dimd_value,'$mvakode',$belop,'$periode','$merknad',NULL,NULL,NULL,NULL)";
! }
//echo 'sql'.$sql.'<br>';
***************
*** 236,240 ****
function select_periods_with_invoice_to_transfer()
{
! $sql= "select distinct periode from v_ecohovedbilag
where not budsjettsigndato is null and (not saksigndato is null or not
oppsynsigndato is null) and not utbetalingsigndato is null ";
$this->db->query($sql,__LINE__,__FILE__);
$i = 0;
--- 239,243 ----
function select_periods_with_invoice_to_transfer()
{
! $sql= "select distinct periode from t_ecobilag where
not budsjettsigndato is null and (not saksigndato is null or not oppsynsigndato
is null) and not utbetalingsigndato is null ";
$this->db->query($sql,__LINE__,__FILE__);
$i = 0;
***************
*** 244,247 ****
--- 247,251 ----
$i++;
}
+ //_debug_array($periode);
return $periode;
}
***************
*** 412,418 ****
$utbetalingsigndato=$BilagOverf['utbetalingsigndato'];
$sql= "INSERT INTO t_ecobilag
(pmwrkord_code,bilagsnr,splitt,kildeid,kidnr,typeid,fakturadato,forfallsdato,regtid,artid,godkjentbelop,spvend_code,dimb,oppsynsmannid,saksbehandlerid,budsjettansvarligid,fakturanr,spbudact_code,dima,dimd,mvakode,belop,periode,merknad,utbetalingid,oppsynsigndato,saksigndato,budsjettsigndato,utbetalingsigndato)"
! . " values
($pmwrkord_code_value,'$bilagsnr','$splitt','$kildeid','$kidnr','$typeid','$fakturadato','$forfallsdato','$regtid','$artid',CONVERT(MONEY,"."'$godkjentbelop'".",0),'$spvend_code',$dimb_value,$oppsynsmannid_value,$saksbehandlerid_value,'$budsjettansvarligid','$fakturanr','$spbudact_code','$dima',$dimd_value,'$mvakode',CONVERT(MONEY,"."'$belop'".",0),'$periode','$merknad',$utbetalingid_value,'$oppsynsigndato','$saksigndato','$budsjettsigndato','$utbetalingsigndato')";
$this->db->query($sql,__LINE__,__FILE__);
--- 416,425 ----
$utbetalingsigndato=$BilagOverf['utbetalingsigndato'];
+ $belop=$this->bocommon->moneyformat($belop);
+
$godkjentbelop=$this->bocommon->moneyformat($godkjentbelop);
+
$sql= "INSERT INTO t_ecobilag
(pmwrkord_code,bilagsnr,splitt,kildeid,kidnr,typeid,fakturadato,forfallsdato,regtid,artid,godkjentbelop,spvend_code,dimb,oppsynsmannid,saksbehandlerid,budsjettansvarligid,fakturanr,spbudact_code,dima,dimd,mvakode,belop,periode,merknad,utbetalingid,oppsynsigndato,saksigndato,budsjettsigndato,utbetalingsigndato)"
! . " values
($pmwrkord_code_value,'$bilagsnr','$splitt','$kildeid','$kidnr','$typeid','$fakturadato','$forfallsdato','$regtid','$artid',$godkjentbelop,'$spvend_code',$dimb_value,$oppsynsmannid_value,$saksbehandlerid_value,'$budsjettansvarligid','$fakturanr','$spbudact_code','$dima',$dimd_value,'$mvakode',$belop,'$periode','$merknad',$utbetalingid_value,'$oppsynsigndato','$saksigndato','$budsjettsigndato','$utbetalingsigndato')";
$this->db->query($sql,__LINE__,__FILE__);
***************
*** 505,516 ****
!
!
! // $bilag_field_names = implode(",",
array_keys($oRsOverfBilag));
! // $bilag_field_values = "'" . implode("','",
$oRsOverfBilag)."'";
! //print_r($bilag_field_values);
$sql="INSERT INTO t_ecobilagoverf
(id,bilagsnr,kidnr,typeid,kildeid,pmwrkord_code,belop,fakturadato,periode,forfallsdato,fakturanr,spbudact_code,regtid,artid,godkjentbelop,spvend_code,dima,dimb,mvakode,dimd,oppsynsmannid,saksbehandlerid,budsjettansvarligid,oppsynsigndato,saksigndato,budsjettsigndato,merknad,splitt,utbetalingid,utbetalingsigndato,filnavn,ordrebelop,overftid)"
! . "values
('$id','$bilagsnr','$kidnr','$typeid','$kildeid',$pmwrkord_code_value,CONVERT(MONEY,"."'$belop'".",0),'$fakturadato','$periode','$forfallsdato','$fakturanr','$spbudact_code','$regtid','$artid',CONVERT(MONEY,"."'$godkjentbelop'".",0),'$spvend_code','$dima',$dimb_value,'$mvakode',$dimd_value,$oppsynsmannid_value,$saksbehandlerid_value,'$budsjettansvarligid','$oppsynsigndato','$saksigndato','$budsjettsigndato','$merknad','$splitt','$utbetalingid','$utbetalingsigndato','$filnavn',CONVERT(MONEY,"."'$ordrebelop'".",0),'$overftid')
";
$this->db->query($sql,__LINE__,__FILE__);
//echo 'sql ' . $sql.'<br>';
--- 512,521 ----
! $belop=$this->bocommon->moneyformat($belop);
!
$godkjentbelop=$this->bocommon->moneyformat($godkjentbelop);
! $ordrebelop=$this->bocommon->moneyformat($ordrebelop);
$sql="INSERT INTO t_ecobilagoverf
(id,bilagsnr,kidnr,typeid,kildeid,pmwrkord_code,belop,fakturadato,periode,forfallsdato,fakturanr,spbudact_code,regtid,artid,godkjentbelop,spvend_code,dima,dimb,mvakode,dimd,oppsynsmannid,saksbehandlerid,budsjettansvarligid,oppsynsigndato,saksigndato,budsjettsigndato,merknad,splitt,utbetalingid,utbetalingsigndato,filnavn,ordrebelop,overftid)"
! . "values
('$id','$bilagsnr','$kidnr','$typeid','$kildeid',$pmwrkord_code_value,$belop,'$fakturadato','$periode','$forfallsdato','$fakturanr','$spbudact_code','$regtid','$artid',$godkjentbelop,'$spvend_code','$dima',$dimb_value,'$mvakode',$dimd_value,$oppsynsmannid_value,$saksbehandlerid_value,'$budsjettansvarligid','$oppsynsigndato','$saksigndato','$budsjettsigndato','$merknad','$splitt','$utbetalingid','$utbetalingsigndato','$filnavn',$ordrebelop,'$overftid')
";
$this->db->query($sql,__LINE__,__FILE__);
//echo 'sql ' . $sql.'<br>';
***************
*** 526,582 ****
function hoved_bilag ($periode)
{
! $sql= "select v_ecohovedbilag.*,t_ecobruker.initialer as
saksbehandler from v_ecohovedbilag left outer join t_ecobruker on
v_ecohovedbilag.budsjettansvarligid=t_ecobruker.spemp_code where
periode='$periode' and not budsjettsigndato is null and (not saksigndato is
null or not oppsynsigndato is null) and not utbetalingsigndato is null ";
$this->db->query($sql,__LINE__,__FILE__);
$i = 0;
while ($this->db->next_record())
{
! $hoved_bilag[$i]['id'] = $this->db->f('id');
! $hoved_bilag[$i]['bilagsnr'] =
$this->db->f('bilagsnr');
! $hoved_bilag[$i]['kidnr'] =
$this->db->f('kidnr');
! $hoved_bilag[$i]['typeid'] =
$this->db->f('typeid');
! $hoved_bilag[$i]['kildeid'] =
$this->db->f('kildeid');
! $hoved_bilag[$i]['pmwrkord_code'] =
$this->db->f('pmwrkord_code');
! $hoved_bilag[$i]['belop'] =
$this->db->f('belop');
! $hoved_bilag[$i]['fakturadato'] =
$this->db->f('fakturadato');
! $hoved_bilag[$i]['periode'] =
$this->db->f('periode');
! $hoved_bilag[$i]['forfallsdato'] =
$this->db->f('forfallsdato');
! $hoved_bilag[$i]['fakturanr'] =
$this->db->f('fakturanr');
! $hoved_bilag[$i]['spbudact_code'] =
$this->db->f('spbudact_code');
! $hoved_bilag[$i]['regtid'] =
$this->db->f('regtid');
! $hoved_bilag[$i]['artid'] =
$this->db->f('artid');
! $hoved_bilag[$i]['godkjentbelop'] =
$this->db->f('godkjentbelop');
! $hoved_bilag[$i]['spvend_code'] =
$this->db->f('spvend_code');
! $hoved_bilag[$i]['dima'] =
$this->db->f('dima');
! $hoved_bilag[$i]['dimb'] =
$this->db->f('dimb');
! $hoved_bilag[$i]['mvakode'] =
$this->db->f('mvakode');
! $hoved_bilag[$i]['dimd'] =
$this->db->f('dimd');
! if($this->db->f('oppsynsmannid'))
! {
! $hoved_bilag[$i]['oppsynsmannid']
= $this->db->f('oppsynsmannid');
! }
! if($this->db->f('saksbehandlerid'))
! {
! $hoved_bilag[$i]['saksbehandlerid']
= $this->db->f('saksbehandlerid');
! }
! $hoved_bilag[$i]['budsjettansvarligid'] =
$this->db->f('budsjettansvarligid');
! if($this->db->f('oppsynsigndato'))
! {
! $hoved_bilag[$i]['oppsynsigndato']
= $this->db->f('oppsynsigndato');
! }
! if($this->db->f('saksigndato'))
{
! $hoved_bilag[$i]['saksigndato'] =
$this->db->f('saksigndato');
! }
! $hoved_bilag[$i]['budsjettsigndato'] =
$this->db->f('budsjettsigndato');
! $hoved_bilag[$i]['merknad'] =
$this->db->f('merknad');
! $hoved_bilag[$i]['splitt'] =
$this->db->f('splitt');
! $hoved_bilag[$i]['utbetalingid'] =
$this->db->f('utbetalingid');
! $hoved_bilag[$i]['utbetalingsigndato'] =
$this->db->f('utbetalingsigndato');
! $hoved_bilag[$i]['saksbehandler'] =
$this->db->f('saksbehandler');
! $i++;
}
return $hoved_bilag;
}
--- 531,611 ----
function hoved_bilag ($periode)
{
! $sql="select sum(belop) as belop, bilagsnr from t_ecobilag
where periode='$periode' AND budsjettsigndato is not NULL AND ( saksigndato
is not NULL OR oppsynsigndato is not NULL ) AND utbetalingsigndato is not
NULL group by bilagsnr";
! //echo 'sql ' . $sql.'<br>';
!
$this->db->query($sql,__LINE__,__FILE__);
$i = 0;
while ($this->db->next_record())
{
! $hoved_bilag_temp[$i]['belop'] =
$this->db->f('belop');
! $hoved_bilag_temp[$i]['bilagsnr'] =
$this->db->f('bilagsnr');
! $i++;
! }
! //_debug_array($hoved_bilag_temp);
! if ($hoved_bilag_temp)
! {
! $i = 0;
! while(each($hoved_bilag_temp))
{
! $bilagsnr =
$hoved_bilag_temp[$i]['bilagsnr'];
! $sql= "select
t_ecobilag.*,t_ecobruker.initialer as saksbehandler from t_ecobilag $this->join
t_ecobruker on t_ecobilag.budsjettansvarligid=t_ecobruker.spemp_code where
bilagsnr='$bilagsnr' ";
!
$this->db->query($sql,__LINE__,__FILE__);
!
! $this->db->next_record();
!
! $hoved_bilag[$i]['id']
= $this->db->f('id');
! $hoved_bilag[$i]['bilagsnr']
= $bilagsnr;
! $hoved_bilag[$i]['kidnr']
= $this->db->f('kidnr');
! $hoved_bilag[$i]['typeid']
= $this->db->f('typeid');
! $hoved_bilag[$i]['kildeid']
= $this->db->f('kildeid');
! $hoved_bilag[$i]['pmwrkord_code']
= $this->db->f('pmwrkord_code');
! $hoved_bilag[$i]['belop']
= $hoved_bilag_temp[$i]['belop'];
! $hoved_bilag[$i]['fakturadato']
= $this->db->f('fakturadato');
! $hoved_bilag[$i]['periode']
= $this->db->f('periode');
! $hoved_bilag[$i]['forfallsdato']
= $this->db->f('forfallsdato');
! $hoved_bilag[$i]['fakturanr']
= $this->db->f('fakturanr');
! $hoved_bilag[$i]['spbudact_code']
= $this->db->f('spbudact_code');
! $hoved_bilag[$i]['regtid']
= $this->db->f('regtid');
! $hoved_bilag[$i]['artid']
= $this->db->f('artid');
! $hoved_bilag[$i]['godkjentbelop']
= $hoved_bilag_temp[$i]['belop'];
! $hoved_bilag[$i]['spvend_code']
= $this->db->f('spvend_code');
! $hoved_bilag[$i]['dima']
= $this->db->f('dima');
! $hoved_bilag[$i]['dimb']
= $this->db->f('dimb');
! $hoved_bilag[$i]['mvakode']
= $this->db->f('mvakode');
! $hoved_bilag[$i]['dimd']
= $this->db->f('dimd');
! if($this->db->f('oppsynsmannid'))
! {
!
$hoved_bilag[$i]['oppsynsmannid'] = $this->db->f('oppsynsmannid');
! }
! if($this->db->f('saksbehandlerid'))
! {
!
$hoved_bilag[$i]['saksbehandlerid'] = $this->db->f('saksbehandlerid');
! }
!
! $hoved_bilag[$i]['budsjettansvarligid']
= $this->db->f('budsjettansvarligid');
!
! if($this->db->f('oppsynsigndato'))
! {
!
$hoved_bilag[$i]['oppsynsigndato'] = $this->db->f('oppsynsigndato');
! }
! if($this->db->f('saksigndato'))
! {
! $hoved_bilag[$i]['saksigndato']
= $this->db->f('saksigndato');
! }
!
! $hoved_bilag[$i]['budsjettsigndato']
= $this->db->f('budsjettsigndato');
! $hoved_bilag[$i]['merknad']
= $this->db->f('merknad');
! $hoved_bilag[$i]['splitt']
= $this->db->f('splitt');
! $hoved_bilag[$i]['utbetalingid']
= $this->db->f('utbetalingid');
! $hoved_bilag[$i]['utbetalingsigndato']
= $this->db->f('utbetalingsigndato');
! $hoved_bilag[$i]['saksbehandler']
= $this->db->f('saksbehandler');
! $i++;
! }
}
+ //_debug_array($hoved_bilag);
+
return $hoved_bilag;
}
***************
*** 648,653 ****
{
// $sql= "select pmlabor_code from spvend where
spvend_code='$spvend_code'";
! $sql= "select klasse from bokalk_leverandoerer where
resknr='$spvend_code'";
$this->db->query($sql,__LINE__,__FILE__);
$this->db->next_record();
--- 677,683 ----
{
// $sql= "select pmlabor_code from spvend where
spvend_code='$spvend_code'";
! // $sql= "select klasse from bokalk_leverandoerer where
resknr='$spvend_code'";
+ $sql= "select contact_value from
phpgw_addressbook_extra where contact_id='$spvend_code' and
contact_name='klasse'";
$this->db->query($sql,__LINE__,__FILE__);
$this->db->next_record();
***************
*** 767,772 ****
{
! $this->db->query("update idgenerator set value = value
+ 1 where name = 'Ecobatchid'");
! $this->db->query("select value from idgenerator where
name = 'Ecobatchid'");
$this->db->next_record();
$bilagsnr = $this->db->f('value');
--- 797,802 ----
{
! $this->db->query("update fm_idgenerator set value =
value + 1 where name = 'Ecobatchid'");
! $this->db->query("select value from fm_idgenerator
where name = 'Ecobatchid'");
$this->db->next_record();
$bilagsnr = $this->db->f('value');
***************
*** 778,782 ****
{
! $this->db->query("select value from idgenerator where
name = 'Ecobatchid'");
$this->db->next_record();
$batchid = $this->db->f('value')+1;
--- 808,812 ----
{
! $this->db->query("select value from fm_idgenerator
where name = 'Ecobatchid'");
$this->db->next_record();
$batchid = $this->db->f('value')+1;
Index: class.uiinvoice.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiinvoice.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** class.uiinvoice.inc.php 6 Jan 2003 16:51:12 -0000 1.3
--- class.uiinvoice.inc.php 9 Jan 2003 19:41:41 -0000 1.4
***************
*** 221,226 ****
--- 221,229 ----
}
+
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',
***************
*** 255,259 ****
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('edit_period' => $data));
! }
}
--- 258,262 ----
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('edit_period' => $data));
! }
}
Index: class.uiXport.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiXport.inc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** class.uiXport.inc.php 6 Jan 2003 16:51:12 -0000 1.9
--- class.uiXport.inc.php 9 Jan 2003 19:41:41 -0000 1.10
***************
*** 232,236 ****
$link_data = array
(
! 'menuaction' =>
$this->currentapp.'.uiXport.import'
);
--- 232,237 ----
$link_data = array
(
! 'menuaction' =>
$this->currentapp.'.uiXport.import',
! 'sub' => $sub
);
***************
*** 313,317 ****
'lang_file'
=> lang('File'),
'lang_conv'
=> lang('Conversion'),
! 'conv_list'
=> $this->bo->select_conv($conv_type),
'select_conv'
=> 'conv_type',
'lang_select_conversion' =>
lang('Select the type of conversion:'),
--- 314,318 ----
'lang_file'
=> lang('File'),
'lang_conv'
=> lang('Conversion'),
! 'conv_list'
=> $this->bo->select_import_conv($conv_type),
'select_conv'
=> 'conv_type',
'lang_select_conversion' =>
lang('Select the type of conversion:'),
***************
*** 406,415 ****
(
'menuaction' =>
$this->currentapp.'.uiXport.import',
! 'convert' => 'true'
);
$link_data_cancel = array
(
! 'menuaction' =>
$this->currentapp.'.uiXport.import'
);
--- 407,419 ----
(
'menuaction' =>
$this->currentapp.'.uiXport.import',
! 'convert' => 'true',
! 'sub' => 'invoice'
);
$link_data_cancel = array
(
! 'menuaction' =>
$this->currentapp.'.uiXport.import',
! 'sub' => 'invoice'
!
);
***************
*** 454,458 ****
unset($table);
! _debug_array($table);
//_debug_array($data);
--- 458,462 ----
unset($table);
! //_debug_array($table);
//_debug_array($data);
***************
*** 464,475 ****
function export()
{
! // global
$values['convert'],$tsvfilename,$values['download'],$values['conv_type'],$roleback_file,$role_back_date;
if ($values['convert'])
{
// echo 'conv_type: '.$values['conv_type'] .'<br>';
! // echo 'roleback_file: '.$roleback_file .'<br>';
! if (($values['conv_type'] == 'none') &&
($roleback_file=='none') ):
{
$GLOBALS['phpgw_info']['flags']['noheader'] = False;
--- 468,574 ----
function export()
{
!
$GLOBALS['phpgw']->xslttpl->add_file(array('invoice','menu',
!
$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'));
!
! $values = get_var('values',array('POST','GET'));
! $date = get_var('date',array('POST','GET'));
! _debug_array($values);
!
! $sub = get_var('sub',array('POST','GET'));
!
! $links = $this->bocommon->menu($sub);
!
! if($values['submit'])
! {
! if (!$values['conv_type'] && !$values['file'] ):
! {
! $receipt['error'][0]['msg']= lang('No
conversion type could be located.');
! $receipt['error'][1]['msg']=
lang('Please choose a conversion type from the list');
! echo ' <a
href="'.$GLOBALS['phpgw']->link('/index.php','menuaction=property.uiXport.export')
. '">' . lang('OK') . '</a>';
! }
! elseif($values['conv_type'] &&
!$values['file']):
! {
! $receipt['message'] =
$this->bo->export($values['conv_type'],$values['download']);
! }
! elseif($values['conv_type'] && $values['file']):
! {
! $receipt['message'] =
$this->bo->rollback($values['conv_type'],$values['file'],$date);
! }
! elseif(!$values['conv_type'] &&
$values['file']):
! {
!
$receipt['error'][0]['msg']=lang('Please choose a conversion type');
! }
! endif;
! }
!
!
! $link_data = array
! (
! 'menuaction' =>
$this->currentapp.'.uiXport.export',
! 'invoice_id' => $invoice_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));
!
!
! $data = array
! (
! 'links'
=> $links,
! 'link_calendar_date' =>
'setDateField(document.form.date);top.newWin=window.open('."'.".'/'.$this->currentapp.'/inc/calendar.html'."'".','."'".'cal'."'".','."'dependent=yes,width=210,height=230,screenX=200,screenY=300,titlebar=yes'".')',
! 'calendar_gif'
=> './'.$this->currentapp.'/templates/default/images/calendar.gif',
! 'calendar_source'
=> './'.$this->currentapp.'/inc/calendar.js',
! 'dateformat'
=> $dateformat,
! 'lang_popup_calendar' =>
lang('Popup Calendar'),
! 'error'
=> $receipt['error'],
! 'appname'
=> lang($this->currentapp),
! 'function_msg'
=> lang('Export invoice'),
! 'lang_select_conv'
=> lang('Select conversion'),
! 'conv_list'
=> $this->bo->select_export_conv($values['conv_type']),
! 'select_conv'
=> 'values[conv_type]',
! 'lang_conv_statustext' =>
lang('Select conversion'),
!
!
! 'lang_select_file'
=> lang('Select file to roll back'),
! 'lang_no_file'
=> lang('No file selected'),
! 'lang_file_statustext' =>
lang('Select file to roll back'),
! 'select_file'
=> 'values[file]',
!
! 'rollback_file_list' =>
$this->bo->select_rollback_file($values['file']),
! 'lang_export_to_file' =>
lang('Export to file'),
! 'value_debug'
=> $values['debug'],
!
! 'lang_date'
=> lang('Export date'),
! 'lang_submit'
=> lang('Submit'),
! 'lang_cancel'
=> lang('Cancel'),
!
! 'message'
=> $receipt['message'],
! 'form_action'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
! 'lang_save'
=> lang('save')
! );
!
! //_debug_array($data);
!
!
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('export' => $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;
***************
*** 482,495 ****
$GLOBALS['phpgw']->common->phpgw_exit();
}
! elseif(!($values['conv_type'] == 'none') &&
($roleback_file=='none')):
{
$buffer =
$this->bo->export($values['conv_type'],$values['download']);
}
! elseif(!($values['conv_type'] == 'none') &&
!($roleback_file=='none')):
{
//$buffer='RullTilbake';
! $buffer =
$this->bo->roleback($values['conv_type'],$roleback_file,$role_back_date);
}
! elseif(($values['conv_type'] == 'none') &&
!($roleback_file=='none')):
{
$buffer=lang('Please choose a
conversion type');
--- 581,594 ----
$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');
***************
*** 551,555 ****
{
$fname = ereg_replace('_','
',$myfilearray[$i]);
! $roleback_file_name .= ' <option
value="'.$myfilearray[$i].'">'.$fname.'</option>'."\n";
}
//----------------
--- 650,654 ----
{
$fname = ereg_replace('_','
',$myfilearray[$i]);
! $rollback_file_name .= ' <option
value="'.$myfilearray[$i].'">'.$fname.'</option>'."\n";
}
//----------------
***************
*** 562,567 ****
$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('Roleback file name'));
!
$this->template->set_var('lang_date',lang('Roleback date'));
$this->template->set_var('lang_popup_calendar',lang('Calendar'));
$this->template->set_var('lang_select_conversion',lang('Select the type of
conversion'));
--- 661,666 ----
$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'));
***************
*** 570,574 ****
$this->template->set_var('conv',$conv);
!
$this->template->set_var('roleback_file_name',$roleback_file_name);
$this->template->set_var('debug',lang(''));
$this->template->set_var('download',lang('Ok'));
--- 669,673 ----
$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'));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: property/inc class.boXport.inc.php,1.5,1.6 class.soXport.inc.php,1.11,1.12 class.uiinvoice.inc.php,1.3,1.4 class.uiXport.inc.php,1.9,1.10,
Sigurd Nes <address@hidden> <=