WIP Contract/Billing 2024-07-04

This commit is contained in:
Frank Schubert
2024-07-05 10:45:22 +02:00
parent 0640babfa3
commit 92edb9c812
27 changed files with 8043 additions and 116 deletions
@@ -158,6 +158,20 @@ class Admin_IvtCreditImport {
$data["finish_date"] = $primary_contract->finish_date;
$data["finish_date_by"] = $primary_contract->finish_date_by;
$data["note"] = $primary_contract->note;
$matchcode = "";
if($primary_contract->termination_id) {
$building = $primary_contract->termination->building;
if($building->networksection_id) {
$matchcode .= $building->networksection->name;
}
$matchcode .= $customer->getCompanyOrName();
$matchcode .= "; ".$building->street.", ".$building->zip." ".$building->city;
} else {
$matchcode .= "; ".$customer->street.", ".$customer->zip." ".$customer->city;
}
} else {
$create_date = new DateTime($cust_cred->created);
$create_date->setTime(2,0);
@@ -183,9 +197,17 @@ class Admin_IvtCreditImport {
$data["finish_date"] = $finish_date->getTimestamp();
$data["finish_date_by"] = 1;
$data["note"] = null;
$matchcode = $cust_cred->comment;
}
$data["matchcode"] = $cust_cred->comment;
$data["matchcode"] = $matchcode;
$data["owner_id"] = $netowner->id;
$data["billingaddress_id"] = $netowner->id;
$data["termination_id"] = null;