mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-09-20 16:31:33 +02:00
Minor fixes
This commit is contained in:
parent
533bcb951e
commit
7b417681f9
@ -49,20 +49,23 @@ class ZugferdEInvoice extends AbstractService
|
||||
$xrechnung = ZugferdDocumentBuilder::CreateNew($profile);
|
||||
|
||||
$xrechnung
|
||||
->setDocumentInformation($this->invoice->number, "380", date_create($this->invoice->date), $this->invoice->client->getCurrencyCode())
|
||||
->setDocumentSupplyChainEvent(date_create($this->invoice->date))
|
||||
->setDocumentSeller($company->getSetting('name'))
|
||||
->setDocumentSellerAddress($company->getSetting("address1"), $company->getSetting("address2"), "", $company->getSetting("postal_code"), $company->getSetting("city"), $company->country()->iso_3166_2, $company->getSetting("state"))
|
||||
->setDocumentSellerContact($this->invoice->user->first_name." ".$this->invoice->user->last_name, "", $this->invoice->user->phone, "", $this->invoice->user->email)
|
||||
->setDocumentBuyer($client->name, $client->number)
|
||||
->setDocumentBuyerAddress($client->address1, "", "", $client->postal_code, $client->city, $client->country->iso_3166_2)
|
||||
->setDocumentBuyerAddress($client->address1, "", "", $client->postal_code, $client->city, $client->country->iso_3166_2, $client->state)
|
||||
->setDocumentBuyerContact($client->primary_contact()->first()->first_name . " " . $client->primary_contact()->first()->last_name, "", $client->primary_contact()->first()->phone, "", $client->primary_contact()->first()->email)
|
||||
->addDocumentPaymentTerm(ctrans("texts.xinvoice_payable", ['payeddue' => date_create($this->invoice->date)->diff(date_create($this->invoice->due_date))->format("%d"), 'paydate' => $this->invoice->due_date]));
|
||||
|
||||
if (!empty($this->invoice->public_notes)) {
|
||||
$xrechnung->addDocumentNote($this->invoice->public_notes);
|
||||
}
|
||||
|
||||
if (empty($this->invoice->number)){
|
||||
$xrechnung->setDocumentInformation("DRAFT", "380", date_create($this->invoice->date), $this->invoice->client->getCurrencyCode());
|
||||
} else {
|
||||
$xrechnung->setDocumentInformation($this->invoice->number, "380", date_create($this->invoice->date), $this->invoice->client->getCurrencyCode());
|
||||
}
|
||||
if (!empty($this->invoice->po_number)) {
|
||||
$xrechnung->setDocumentBuyerOrderReferencedDocument($this->invoice->po_number);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user