Browse Source

[Administration] Bons de livraison > PDF : bug date 1er janvier 1970

feature/souke
Guillaume Bourgeois 9 months ago
parent
commit
04e3de281a
2 changed files with 6 additions and 0 deletions
  1. +1
    -0
      domain/Document/DeliveryNote/DeliveryNoteBuilder.php
  2. +5
    -0
      domain/Document/Document/DocumentBuilder.php

+ 1
- 0
domain/Document/DeliveryNote/DeliveryNoteBuilder.php View File

@@ -34,6 +34,7 @@ class DeliveryNoteBuilder extends DocumentBuilder
$deliveryNote = new DeliveryNote();

$deliveryNote->status = Document::STATUS_DRAFT;
$this->initDocumentDate($deliveryNote);
$this->initDocumentProducer($deliveryNote);
$this->initTaxCalculationMethod($deliveryNote);


+ 5
- 0
domain/Document/Document/DocumentBuilder.php View File

@@ -34,6 +34,11 @@ class DocumentBuilder extends AbstractBuilder
}
}

public function initDocumentDate(Document $document)
{
$document->date = date('Y-m-d H:i:s');
}

public function updateDocumentIsSend(Document $document, bool $isSent)
{
$document->is_sent = $isSent;

Loading…
Cancel
Save