13 include_once
'./Services/Payment/classes/class.ilPaymentSettings.php';
34 $this->ud_invoice_number = $a_ud_invoice_number;
43 $this->invoice_number_text = $a_invoice_number_text;
52 $this->inc_start_value = $a_inc_start_value;
61 $this->inc_current_value = $a_inc_current_value;
73 $this->inc_reset_period = $a_inc_reset_period;
85 $this->inc_last_reset = $a_timestamp;
90 return $this->inc_last_reset;
101 $settings = $this->pSettings->getValuesByScope(
'invoice_number');
102 $this->ud_invoice_number = $settings[
'ud_invoice_number'];
103 $this->invoice_number_text = $settings[
'invoice_number_text'];
104 $this->inc_start_value = $settings[
'inc_start_value'];
105 $this->inc_current_value = $settings[
'inc_current_value'];
106 $this->inc_reset_period = $settings[
'inc_reset_period'];
107 $this->inc_last_reset = $settings[
'inc_last_reset'];
114 $this->pSettings->set(
'inc_start_value', $this->
getIncStartValue(),
'invoice_number');
115 $this->pSettings->set(
'inc_reset_period', $this->
getIncResetPeriod(),
'invoice_number');
122 $cur_id =
$pSettings->get(
'inc_current_value');
123 $next_id = ++$cur_id;
125 $pSettings->set(
'inc_current_value', $next_id,
'invoice_number');
136 $pSettings->set(
'inc_current_value', $a_value,
'invoice_number');
159 if(!IS_PAYMENT_ENABLED)
return false;
177 $now_month = date(
'n', $now);
178 $now_year = date(
'Y', $now);
185 if($last_year < $now_year)
191 if(($last_month < $now_month) || ($last_month > $now_month && $last_year < $now_year) )
211 $this->pSettings->set(
'inc_current_value',$this->
getIncCurrentValue(),
'invoice_number');
212 $this->pSettings->set(
'inc_last_reset',$this->
getIncLastReset(),
'invoice_number');