Added Fibu payment due and skonto to Billing
This commit is contained in:
@@ -164,6 +164,14 @@ class BillingController extends mfBaseController {
|
||||
//$now_month = 11;
|
||||
//$now_day = 3;
|
||||
|
||||
$locked = new mfConfig("billing.running");
|
||||
if($locked->value()) {
|
||||
$this->layout()->setFlash("Läuft schon seit ".date("d.m.Y H:i", $locked->edit));
|
||||
$this->redirect("Billing");
|
||||
}
|
||||
$locked->value(1);
|
||||
$locked->save();
|
||||
|
||||
// XXX only for 1st Billing after IVT Import
|
||||
// Locking to July 2024 and keeping it for now
|
||||
$yearly_not_before = new DateTime("2024-07-01");
|
||||
@@ -467,6 +475,12 @@ class BillingController extends mfBaseController {
|
||||
$data["billingaddress_id"] = ($contract->billingaddress_id) ? $contract->billingaddress_id : $contract->owner_id;
|
||||
$data["customer_number"] = $contract->owner->customer_number;
|
||||
$data["fibu_account_number"] = $fibu_account_num;
|
||||
|
||||
// TODO: Zahlungsziel / Skonto muss in Zukuft vom Contract übernommen werden
|
||||
$data["fibu_payment_due"] = $owner->fibu_payment_due ?: TT_ADDRESS_DEFAULT_PAYMENT_DUE;
|
||||
$data["fibu_payment_skonto"] = $owner->fibu_payment_skonto ?: 0;
|
||||
$data["fibu_payment_skonto_rate"] = $owner->fibu_payment_skonto_rate ?: 0;
|
||||
|
||||
$data["company"] = $billingaddress->company;
|
||||
$data["firstname"] = $billingaddress->firstname;
|
||||
$data["lastname"] = $billingaddress->lastname;
|
||||
@@ -758,6 +772,10 @@ class BillingController extends mfBaseController {
|
||||
|
||||
|
||||
}
|
||||
|
||||
$locked->value(0);
|
||||
$locked->save();
|
||||
|
||||
$this->layout()->setFlash("$i Contract Billing records generiert. $v Voicenumber Billing records generiert");
|
||||
$this->redirect("Billing");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user