minor fixes

This commit is contained in:
David Bomba 2024-06-22 20:33:53 +10:00
parent 6138f11ece
commit 540dd2f43e
4 changed files with 6 additions and 4 deletions

View File

@ -112,8 +112,7 @@ class CreateRawPdf
try {
$pdf = $ps->boot()->getPdf();
} catch (\Exception $e) {
echo "EXCEPTION::".PHP_EOL;
echo $e->getMessage().PHP_EOL;
nlog($e->getMessage());
throw new FilePermissionsFailure('Unable to generate the raw PDF');
}

View File

@ -21,6 +21,7 @@ class UpdateInvoiceActivity implements ShouldQueue
{
protected $activity_repo;
public $delay = 10;
/**
* Create the event listener.
*

View File

@ -81,6 +81,8 @@ class ActivityRepository extends BaseRepository
return;
}
$entity = $entity->fresh();
if (get_class($entity) == Invoice::class
|| get_class($entity) == Quote::class
|| get_class($entity) == Credit::class

View File

@ -292,9 +292,9 @@ class InvoiceService
//12-10-2022
if ($this->invoice->partial > 0 && !$this->invoice->partial_due_date) {
$this->invoice->partial_due_date = Carbon::parse($this->invoice->date)->addDays($this->invoice->client->getSetting('payment_terms'));
$this->invoice->partial_due_date = Carbon::parse($this->invoice->date)->addDays((int)$this->invoice->client->getSetting('payment_terms'));
} else {
$this->invoice->due_date = Carbon::parse($this->invoice->date)->addDays($this->invoice->client->getSetting('payment_terms'));
$this->invoice->due_date = Carbon::parse($this->invoice->date)->addDays((int)$this->invoice->client->getSetting('payment_terms'));
}
return $this;