[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [14795] rental billing
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [14795] rental billing |
Date: |
Wed, 02 Mar 2016 09:05:27 +0000 |
Revision: 14795
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14795
Author: sigurdne
Date: 2016-03-02 09:05:27 +0000 (Wed, 02 Mar 2016)
Log Message:
-----------
rental billing
Modified Paths:
--------------
trunk/rental/inc/class.sobilling.inc.php
trunk/rental/inc/class.uibilling.inc.php
Modified: trunk/rental/inc/class.sobilling.inc.php
===================================================================
--- trunk/rental/inc/class.sobilling.inc.php 2016-03-02 09:05:05 UTC (rev
14794)
+++ trunk/rental/inc/class.sobilling.inc.php 2016-03-02 09:05:27 UTC (rev
14795)
@@ -380,7 +380,7 @@
$vfs->override_acl = 1;
$path = "/rental";
- $dir = array('string' => $path,
RELATIVE_NONE);
+ $dir = array('string' => $path,
'relatives' => array(RELATIVE_NONE));
if (!$vfs->file_exists($dir))
{
if (!$vfs->mkdir($dir))
@@ -390,7 +390,7 @@
}
$path .= "/billings";
- $dir = array('string' => $path,
RELATIVE_NONE);
+ $dir = array('string' =>
$path,'relatives' => array( RELATIVE_NONE));
if (!$vfs->file_exists($dir))
{
if (!$vfs->mkdir($dir))
@@ -399,18 +399,15 @@
}
}
-
$id = $billing_job->get_id();
$export_data =
$exportable->get_contents();
$file_path = $path . "/{$id}";
if ($export_data != "")
{
- $result = $vfs->write
- (
- array
- (
+ $result = $vfs->write(
+ array(
'string' =>
$file_path,
- RELATIVE_NONE,
+ 'relatives' =>
array(RELATIVE_NONE),
'content' =>
$export_data
)
);
Modified: trunk/rental/inc/class.uibilling.inc.php
===================================================================
--- trunk/rental/inc/class.uibilling.inc.php 2016-03-02 09:05:05 UTC (rev
14794)
+++ trunk/rental/inc/class.uibilling.inc.php 2016-03-02 09:05:27 UTC (rev
14795)
@@ -32,7 +32,7 @@
$GLOBALS['phpgw_info']['flags']['app_header'] .= '::' .
lang('invoice_menu');
}
- private function _object_to_array( $contract , $include_billing
= false)
+ private function _object_to_array( $contract, $include_billing
= false )
{
$values['old_contract_id'] =
$contract->get_old_contract_id();
$values['start_date'] =
($contract->get_contract_date()->has_start_date()) ? date($this->dateFormat,
$contract->get_contract_date()->get_start_date()) : '';
@@ -44,7 +44,7 @@
if ($contract->get_bill_only_one_time())
{
$values['bill_only_one_time'] =
lang('only_one_time_yes');
- $values['old_contract_id'] .= '<input
name="bill_only_one_time[]" value="' . $contract->get_id() . '" type="hidden"/>'
+ $values['old_contract_id'] .= '<input
name="bill_only_one_time[]" value="' . $contract->get_id() . '" type="hidden"/>'
. '<input name="contract[]" value="' .
$contract->get_id() . '" type="hidden"/>';
}
else
@@ -52,7 +52,7 @@
$values['bill_only_one_time'] =
lang('only_one_time_no');
}
- if($include_billing)
+ if ($include_billing)
{
$values['old_contract_id'] .= '<input
name="contract[]" value="' . $contract->get_id() . '" type="hidden"/>';
}
@@ -84,6 +84,15 @@
// Step 3 - the billing job
if (phpgw::get_var('step') == '2' &&
phpgw::get_var('next') != null) // User clicked next on step 2
{
+ if ($GLOBALS['phpgw']->session->is_repost())
+ {
+
phpgwapi_cache::message_set(lang('Hmm... looks like a repost!'), 'error');
+ self::redirect(array(
+ 'menuaction' =>
'rental.uibilling.index'
+ )
+ );
+ }
+
$use_existing = phpgw::get_var('use_existing');
$existing_billing =
phpgw::get_var('existing_billing');
if ($use_existing < 1)
@@ -425,7 +434,7 @@
$tabletools_irregular_contracts[] = array
(
'my_name' => 'override_all',
- 'className'=> 'select',
+ 'className' => 'select',
'text' => lang('Override'),
'type' => 'custom',
'custom_code' => "checkOverride();"
@@ -433,7 +442,7 @@
$tabletools_irregular_contracts[] = array
(
'my_name' => 'bill2_all',
- 'className'=> 'select',
+ 'className' => 'select',
'text' => lang('Bill2'),
'type' => 'custom',
'custom_code' => "checkBill2()"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [14795] rental billing,
Sigurd Nes <=