diff --git a/Layout/default/Contract/View.php b/Layout/default/Contract/View.php new file mode 100644 index 000000000..7b61a5213 --- /dev/null +++ b/Layout/default/Contract/View.php @@ -0,0 +1,485 @@ + + + +
+
+
+
+ +
+

Aktives Produkt

+
+
+
+ + +
+
+ + + +
+
+ isFinished()): ?> +

In Herstellung

+ + isCancelled()): ?> +

GEKÜNDIGT

+ + sla->name), "residential")): ?> +

Privatprodukt

+ +

Businessprodukt

+ +

">product_name?> [id?>]

+ + + + + + + + upgradeFrom) && count($contract->upgradeFrom)): ?> + + + + + + upgradeTo) && count($contract->upgradeTo)): ?> + + + + + + + + downgradeFrom) && count($contract->downgradeFrom)): ?> + + + + + + downgradeTo) && count($contract->downgradeTo)): ?> + + + + + + + + productchangeFrom) && count($contract->productchangeFrom)): ?> + + + + + + productchangeTo) && count($contract->productchangeTo)): ?> + + + + + + + + relocationFrom) && count($contract->relocationFrom)): ?> + + + + + + relocationTo) && count($contract->relocationTo)): ?> + + + + + + + + + + billingaddress_id): ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Matchcode:matchcode?>
Upgrade von: + upgradeFrom as $link): ?> + $link->origin_contract_id])?>" class="contract-link origin->cancel_date && $link->origin->cancel_date <= date('U')) ? "canceled" : ""?>">origin->product_name?> [origin->matchcode?>] (origin_contract_id?>)
+ +
Upgrade auf: + upgradeTo as $link): ?> + $link->contract_id])?>" class="contract-link contract->cancel_date && $link->contract->cancel_date <= date('U')) ? "canceled" : ""?> contract->isFinished()) ? "not-finished" : "" ?>">contract->product_name?> [contract->matchcode?>] (contract_id?>)
+ +
Downgrade von: + downgradeFrom as $link): ?> + $link->origin_contract_id])?>" class="contract-link origin->cancel_date <= date('U')) ? "canceled" : ""?>">origin->product_name?> [origin->matchcode?>] (origin_contract_id?>)
+ +
Downgrade auf: + downgradeTo as $link): ?> + $link->contract_id])?>" class="contract-link contract->cancel_date && $link->contract->cancel_date <= date('U')) ? "canceled" : ""?>">contract->product_name?> [contract->matchcode?>] (contract_id?>)
+ +
Produktwechsel von: + productchangeFrom as $link): ?> + $link->origin_contract_id])?>" class="contract-link origin->cancel_date <= date('U')) ? "canceled" : ""?>">origin->product_name?> [origin->matchcode?>] (origin_contract_id?>)
+ +
Produktwechsel auf: + productchangeTo as $link): ?> + $link->contract_id])?>" class="contract-link contract->cancel_date && $link->contract->cancel_date <= date('U')) ? "canceled" : ""?>">contract->product_name?> [contract->matchcode?>] (contract_id?>)
+ +
Umzug von: + relocationFrom as $link): ?> + $link->origin_contract_id])?>" class="contract-link origin->cancel_date && $link->origin->cancel_date <= date('U')) ? "canceled" : ""?>">origin->product_name?> [origin->matchcode?>] (origin_contract_id?>)
+ +
Umzug auf: + relocationTo as $link): ?> + $link->contract_id])?>" class="contract-link contract->cancel_date && $link->contract->cancel_date <= date('U')) ? "canceled" : ""?>">contract->product_name?> [contract->matchcode?>] (contract_id?>)
+ +
Vertragsinhaber: $contract->owner_id])?>">owner->getCompanyOrName()?> [owner->customer_number?>]
Rechnungsempfänger: $contract->billingaddress_id])?>">billingaddress->getCompanyOrName()?> [billingaddress->customer_number?>]
Produkt:product_name?> [product_id?>]product_name != $contract->product->name) ? " (".$contract->product->name.")" : ""?>
Produkt Info:product_info?>
SLA:sla->name?>
Externes Produkt:product_external) ? "Ja" : "Nein"?>
Menge:amount, 3, ",", ".")?>
Preis Periodisch Netto:">€ amount != 1) ? $contract->price * $contract->amount : $contract->price, 4, ",", ".")?>
Preis Periodisch Brutto:">€ + price && $contract->vatrate): ?> + amount != 1): ?> + price + ($contract->price / 100) * $contract->vatrate, 4, ",", ".")?> + + price + ($contract->price / 100) * $contract->vatrate) * $contract->amount, 4, ",", ".")?> + + +
Verrechnungsperiode: + billing_period, "billing_period")?> +
Herstellungskosten:"> + price_setup != 0): ?> + Netto: € price_setup, 4, ",", ".")?>amount != 1) ? " (Gesamt: € ".number_format($contract->price_setup * $contract->amount, 4, ",", ".").")" : ""?>
+ Brutto: € price_setup && $contract->vatrate) ? number_format($contract->price_setup + ($contract->price_setup / 100) * $contract->vatrate, 4, ",", ".") : ""?>price_setup && $contract->vatrate && $contract->amount != 1) ? " (Gesamt: € ".number_format(($contract->price_setup + ($contract->price_setup / 100) * $contract->vatrate) * $contract->amount, 4, ",", ".").")" : ""?>
Verrechnungsstart Verzögerung: + billing_delay): ?> + billing_delay?> Monate + +
Bestelldatum:order_date) ? date('d.m.Y',$contract->order_date) : ""?>
Fertigstellungsdatum: + finish_date) ? date('d.m.Y',$contract->finish_date) : ""?> + finish_date_by) ? "(".$contract->finisher->name.")" : ""?> +
Kündigungsdatum:"> + cancel_date) ? date('d.m.Y',$contract->cancel_date) : ""?> + cancel_date_by) ? "(".$contract->canceler->name.")" : ""?> +
Erstellt:create)?> (creator->name?>)
Zuletzt bearbeitet:edit)?> (editor->name?>)
+ $contract->id])?>"> + $contract->id])?>"> + finish_date && $contract->finish_date < date('U')): ?> + + $contract->id])?>"> + $contract->id])?>"> + finish_date): ?> + $contract->id])?>" onclick="if(!confirm('Jetzt fertigstellen und in Verrechnung geben?')) return false"> + +
+ +
+
+ +
+
+
Journaleinträge
+
+
+
+
+ + + journals) && count($contract->journals)): ?> + journals as $j): ?> + + + + type == "text" || $j->type == "phone"):?> + + text) > 120): ?> + + + + + + + type == "file"): ?> + + + + type == "created_from"): ?> + + + type == "contract_finished"): ?> + + + type == "credit_created"): ?> + + + type == "link"): ?> + value); ?> + + + type == "canceled"): ?> + + + + + + + + + + + + + +
create)?> (creator?>) + type == "text"): ?> + + + + + + text), 120)?> + + + text)?> + + text): ?> + text), 128)?>
+ + $j->contractfile->file_id])?>">contractfile->file->filename?> +
+ value == "manual"): ?> + Vertrag manuell erstellt + value == "import"): ?> + Vertrag importiert: text))?> + value == "order"): ?> + Vertrag aus Bestellung $contract->orderproduct->order_id])?>">#orderproduct->order_id?> erstellt + value == "productchange"): ?> + Vertrag erstellt: text))?> + + Vertag fertiggestellt + + Gutschrift-Vertrag $j->value])?>">value?> erstellt + + Verknüpfung mit $link->id])?>">id?> - product_name?> [matchcode?>] erstelltVertag gekündigt + $j->id])?>" title="Journaleintrag bearbeiten"> +
+
+ +
+ +
+
+
+
+ + + +
+
+

Verknüpfte Verträge $contract->id])?>">Neuen Contract anlegen

+ linkFrom) && count($contract->linkFrom)) || (is_array($contract->linkTo) && count($contract->linkTo))): ?> + + + + + + + + + + + + + + linkFrom, $contract->linkTo] as $links): ?> + + contract_id == $contract->id) { + $direction = "von"; + $linkcontract = $link->origin; + if($link->type == "credit") { + $direction = "zu"; + //continue; + } + } else { + $linkcontract = $link->contract; + if($link->type == "upgrade" || $link->type == "downgrade") { + $direction = "auf"; + } + if($link->type == "relocation") { + $direction = "nach"; + } + if($link->type == "credit") { + $direction = ""; + //continue; + } + + } + + ?> + + + + + + + + + + + + + + + +
TypKundeContract IDProduktPreisPreis SetupBestelldatumFertigstellungKündigung
">type, "contract")?> type != "link") ? $direction : ""?> $linkcontract->owner_id])?>">owner->getCompanyOrName()?> isFinished()) ? "not-finished" : "" ?>"> $linkcontract->id])?>">id?> isFinished()) ? "not-finished" : "" ?>"> $linkcontract->id])?>">product_name?> [matchcode?>] isFinished()) ? "not-finished" : "" ?> price < 0) ? "text-danger" : ""?>">€ price,4,",",".")?> isFinished()) ? "not-finished" : "" ?> price_setup < 0) ? "text-danger" : ""?>">€ price_setup,4,",",".")?> isFinished()) ? "not-finished" : "" ?>">order_date) ? date('d.m.Y', $linkcontract->order_date) : ""?> isFinished()) ? "not-finished" : "" ?>">finish_date) ? date('d.m.Y', $linkcontract->finish_date) : ""?> isFinished()) ? "not-finished" : "" ?> cancel_date) ? "text-danger font-weight-bold" : ""?>">cancel_date) ? date('d.m.Y', $linkcontract->cancel_date) : ""?> + $link->id])?>" onclick="if(!confirm('Verknüpfung wirklich entfernen?')) return false;" class="text-danger" title="Verknüpfung entfernen"> +
+ +
+
+ + + + +
+
+ + + diff --git a/application/ContractFile/ContractFile.php b/application/ContractFile/ContractFile.php index fad92dbf4..55225c131 100644 --- a/application/ContractFile/ContractFile.php +++ b/application/ContractFile/ContractFile.php @@ -1,7 +1,7 @@ id) {