Tweaks to IVT Import
This commit is contained in:
@@ -26,6 +26,7 @@ class Admin_IvtContractImport {
|
||||
* WHERE `cid` = 1840;
|
||||
*/
|
||||
$this->static_ivt_order_match = [
|
||||
9 => false,
|
||||
17245 => 3946, // lugitsch 1840
|
||||
16704 => 3342,
|
||||
16703 => 3342,
|
||||
@@ -204,26 +205,23 @@ class Admin_IvtContractImport {
|
||||
$contract_data['edit_by'] = 1;
|
||||
|
||||
$finish_date = new DateTime($ivt_contract->lastdate);
|
||||
$finish_date->modify("first day of this month");
|
||||
|
||||
switch($ip->interval) {
|
||||
case 0:
|
||||
$contract_data['billing_period'] = 1;
|
||||
//$finish_date->modify("+1 month");
|
||||
$finish_date->modify("+1 month");
|
||||
break;
|
||||
case 1:
|
||||
$contract_data['billing_period'] = 12;
|
||||
//$finish_date->modify("+1 year");
|
||||
$contract_data["billing_delay"] = 12;
|
||||
break;
|
||||
}
|
||||
|
||||
$order_date = new DateTime($ivt_contract->created);
|
||||
$order_date->setTime(2,0,0);
|
||||
|
||||
$finish_date->modify("first day of this month");
|
||||
$finish_date->setTime(2,0,0);
|
||||
//$finish_date->modify("+1 month"); // XXX for debugging only; must be removed
|
||||
//$finish_date->setDate($finish_date->format("Y"), $finish_date->format("m"), 1);
|
||||
//$finish_date->modify("+1 hours");
|
||||
|
||||
$contract_data['order_date'] = $order_date->getTimestamp();
|
||||
$contract_data['finish_date'] = $finish_date->getTimestamp();
|
||||
|
||||
@@ -181,7 +181,7 @@ class Admin_IvtCreditImport {
|
||||
$finish_date = new DateTime($cust_cred->lastdate);
|
||||
$finish_date->modify("first day of this month");
|
||||
$finish_date->setTime(2,0,0);
|
||||
//$finish_date->modify("+ 1 month"); // XXX for debugging only; must be removed
|
||||
$finish_date->modify("+ 1 month"); // XXX For import, because july was not invoiced in IVT
|
||||
//$finish_date->setDate($finish_date->format("Y"), $finish_date->format("m"), 1);
|
||||
|
||||
$data["orderproduct_id"] = null;
|
||||
|
||||
Reference in New Issue
Block a user