Added email & phone to Contract export
This commit is contained in:
@@ -3,8 +3,8 @@ $filename = "contracts-export-".date("Y-m-d_H-i-s").".csv";
|
||||
header("Content-type: text/csv; charset=utf-8");
|
||||
header('Content-disposition: attachment; filename="'.$filename.'"');
|
||||
?>
|
||||
<?="\u{FEFF}"?>Contract ID;Vertragsinhaber Kundennummer;Vertragsinhaber Name;Vertragsinhaber Straße;Vertragsinhaber PLZ;Vertragsinhaber Ort;Vertragsinhaber Land;Rechnungsempfänger Kundennummer;Rechnungsempfänger Name;Rechnungsempfänger Straße;Rechnungsempfänger PLZ;Rechnungsempfänger Ort;Rechnungsempfänger Land;SLA;Produktgruppe;Produktname;Matchcode;Menge;Einzelpreis;Gesamtpreis;Preis Setup;Rechungsperiode;Verrechnungsstart Verzögerung;Bestelldatum;Fertigstellungsdatum;Kündigungsdatum;Erstellt;Zuletzt bearbeitet
|
||||
<?="\u{FEFF}"?>Contract ID;Vertragsinhaber Kundennummer;Vertragsinhaber Name;Vertragsinhaber Straße;Vertragsinhaber PLZ;Vertragsinhaber Ort;Vertragsinhaber Land;Vertragsinhaber Telefon;Vertragsinhaber Email;Rechnungsempfänger Kundennummer;Rechnungsempfänger Name;Rechnungsempfänger Straße;Rechnungsempfänger PLZ;Rechnungsempfänger Ort;Rechnungsempfänger Land;Rechnungsempfänger Telefon;Rechnungsempfänger Email;SLA;Produktgruppe;Produktname;Individueller Produktname;Matchcode;Menge;Einzelpreis;Gesamtpreis;Preis Setup;Rechungsperiode;Verrechnungsstart Verzögerung;Bestelldatum;Fertigstellungsdatum;Kündigungsdatum;Erstellt;Zuletzt bearbeitet
|
||||
<?php foreach($contracts as $contract): ?>
|
||||
<?=$contract->id?>;<?=$contract->owner->customer_number?>;"<?=$contract->owner->getCompanyOrName()?>";"<?=$contract->owner->street?>";"<?=$contract->owner->zip?>";"<?=$contract->owner->city?>";"<?=$contract->owner->country->isocode?>";<?=$contract->billingaddress->customer_number?>;"<?=$contract->billingaddress->getCompanyOrName()?>";"<?=$contract->billingaddress->street?>";"<?=$contract->billingaddress->zip?>";"<?=$contract->billingaddress->city?>";"<?=$contract->billingaddress->country->isocode?>";"<?=$contract->sla->name?>";"<?=$contract->product->productgroup->name?>";"<?=$contract->product->name?>";"<?=str_replace(["\r","\n",'"'],[" ", " ", '""'],$contract->matchcode)?>";<?=$contract->amount?>;<?=$contract->price?>;<?=$contract->price * $contract->amount?>;<?=$contract->price_setup?>;<?=__($contract->billing_period, "billing_period")?>;<?=$contract->billing_delay?>;<?=($contract->order_date) ? date("Y-m-d", $contract->order_date) : ""?>;<?=($contract->finish_date) ? date("Y-m-d", $contract->finish_date) : ""?>;<?=($contract->cancel_date) ? date("Y-m-d", $contract->cancel_date) : ""?>;<?=date("Y-m-d", $contract->create)?>;<?=date("Y-m-d", $contract->edit)?>
|
||||
<?=$contract->id?>;<?=$contract->owner->customer_number?>;"<?=$contract->owner->getCompanyOrName()?>";"<?=$contract->owner->street?>";"<?=$contract->owner->zip?>";"<?=$contract->owner->city?>";"<?=$contract->owner->country->isocode?>";"<?=$contract->owner->phone?>";"<?=$contract->owner->email?>";<?=$contract->billingaddress->customer_number?>;"<?=$contract->billingaddress->getCompanyOrName()?>";"<?=$contract->billingaddress->street?>";"<?=$contract->billingaddress->zip?>";"<?=$contract->billingaddress->city?>";"<?=$contract->billingaddress->country->isocode?>";"<?=$contract->billingaddress->phone?>";"<?=$contract->billingaddress->email?>";"<?=$contract->sla->name?>";"<?=$contract->product->productgroup->name?>";"<?=$contract->product->name?>";"<?=$contract->product_name?>";"<?=str_replace(["\r","\n",'"'],[" ", " ", '""'],$contract->matchcode)?>";<?=$contract->amount?>;<?=$contract->price?>;<?=$contract->price * $contract->amount?>;<?=$contract->price_setup?>;<?=__($contract->billing_period, "billing_period")?>;<?=$contract->billing_delay?>;<?=($contract->order_date) ? date("Y-m-d", $contract->order_date) : ""?>;<?=($contract->finish_date) ? date("Y-m-d", $contract->finish_date) : ""?>;<?=($contract->cancel_date) ? date("Y-m-d", $contract->cancel_date) : ""?>;<?=date("Y-m-d", $contract->create)?>;<?=date("Y-m-d", $contract->edit)?>
|
||||
|
||||
<?php endforeach; ?>
|
||||
Reference in New Issue
Block a user