1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 08:21:34 +02:00

Update PurchaseOrderService.php

This commit is contained in:
Lars Kusch 2024-03-19 15:33:58 +01:00 committed by GitHub
parent ca2d0284e9
commit e6df82b6d2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -88,12 +88,12 @@ class PurchaseOrderService
$this->purchase_order->invitations->each(function ($invitation) {
try {
// if (Storage::disk(config('filesystems.default'))->exists($this->invoice->client->e_invoice_filepath($invitation).$this->invoice->getFileName("xml"))) {
Storage::disk(config('filesystems.default'))->delete($this->purchase_order->contact->vendor->e_document_filepath($invitation).$this->purchase_order->getFileName("xml"));
Storage::disk(config('filesystems.default'))->delete($this->purchase_order->vendor->e_document_filepath($invitation).$this->purchase_order->getFileName("xml"));
// }
// if (Ninja::isHosted() && Storage::disk('public')->exists($this->invoice->client->e_invoice_filepath($invitation).$this->invoice->getFileName("xml"))) {
if (Ninja::isHosted()) {
Storage::disk('public')->delete($this->purchase_order->contact->vendor->e_document_filepath($invitation).$this->purchase_order->getFileName("xml"));
Storage::disk('public')->delete($this->purchase_order->->vendor->e_document_filepath($invitation).$this->purchase_order->getFileName("xml"));
}
} catch (\Exception $e) {
nlog($e->getMessage());