diff --git a/app/Models/Client.php b/app/Models/Client.php index b48973655050..66d04a14ade7 100644 --- a/app/Models/Client.php +++ b/app/Models/Client.php @@ -412,6 +412,7 @@ class Client extends BaseModel implements HasLocalePreference public function date_format() { + /** @var \Illuminate\Support\Collection $date_formats */ $date_formats = app('date_formats'); // $date_formats = Cache::get('date_formats'); @@ -428,6 +429,8 @@ class Client extends BaseModel implements HasLocalePreference public function currency() { + + /** @var \Illuminate\Support\Collection $currencies */ $currencies = app('currencies'); // $currencies = Cache::get('currencies'); diff --git a/app/PaymentDrivers/PayPalPPCPPaymentDriver.php b/app/PaymentDrivers/PayPalPPCPPaymentDriver.php index f98d5de3b043..3f29b8146516 100644 --- a/app/PaymentDrivers/PayPalPPCPPaymentDriver.php +++ b/app/PaymentDrivers/PayPalPPCPPaymentDriver.php @@ -319,6 +319,7 @@ class PayPalPPCPPaymentDriver extends PayPalBasePaymentDriver */ public function processTokenPayment($request, array $response) { + /** @var \App\Models\ClientGatewayToken $cgt */ $cgt = ClientGatewayToken::where('client_id', $this->client->id) ->where('token', $request['token']) ->firstOrFail(); diff --git a/app/PaymentDrivers/PayPalRestPaymentDriver.php b/app/PaymentDrivers/PayPalRestPaymentDriver.php index 07800f2cc665..5e06c72d2422 100644 --- a/app/PaymentDrivers/PayPalRestPaymentDriver.php +++ b/app/PaymentDrivers/PayPalRestPaymentDriver.php @@ -295,7 +295,7 @@ class PayPalRestPaymentDriver extends PayPalBasePaymentDriver */ public function processTokenPayment($request, array $response) { - /** @car \App\Models\ClientGatwayToken $cgt */ + /** @var \App\Models\ClientGatewayToken $cgt */ $cgt = ClientGatewayToken::where('client_id', $this->client->id) ->where('token', $request['token']) ->firstOrFail(); diff --git a/app/PaymentDrivers/WePayPaymentDriver.php b/app/PaymentDrivers/WePayPaymentDriver.php index 4d1cb96e1766..20daa4b410e1 100644 --- a/app/PaymentDrivers/WePayPaymentDriver.php +++ b/app/PaymentDrivers/WePayPaymentDriver.php @@ -75,7 +75,7 @@ class WePayPaymentDriver extends BaseDriver * Setup the gateway * * @param array $data user_id + company - * @return \Illuminate\View\View + * @return void */ public function setup(array $data) { diff --git a/app/Services/EDocument/Standards/OrderXDocument.php b/app/Services/EDocument/Standards/OrderXDocument.php index 63b63a901e4a..f6dbaf3e3dd7 100644 --- a/app/Services/EDocument/Standards/OrderXDocument.php +++ b/app/Services/EDocument/Standards/OrderXDocument.php @@ -25,10 +25,16 @@ use horstoeko\orderx\OrderProfiles; class OrderXDocument extends AbstractService { public OrderDocumentBuilder $orderxdocument; - - /** @var \App\Models\Invoice | \App\Models\Quote | \App\Models\PurchaseOrder | \App\Models\Credit $document */ - - public function __construct(public mixed $document, private readonly bool $returnObject = false, private array $tax_map = []) + + /** + * __construct + * + * @param \App\Models\Invoice | \App\Models\Quote | \App\Models\PurchaseOrder | \App\Models\Credit $document + * @param bool $returnObject + * @param array $tax_map + * @return void + */ + public function __construct(public \App\Models\Invoice | \App\Models\Quote | \App\Models\PurchaseOrder | \App\Models\Credit $document, private readonly bool $returnObject = false, private array $tax_map = []) { } @@ -36,7 +42,6 @@ class OrderXDocument extends AbstractService { $company = $this->document->company; - /** @var \App\Models\Client | \App\Models\Vendor $settings_entity */ $settings_entity = ($this->document instanceof PurchaseOrder) ? $this->document->vendor : $this->document->client; $profile = $settings_entity->getSetting('e_quote_type') ? $settings_entity->getSetting('e_quote_type') : "OrderX_Extended"; @@ -176,7 +181,17 @@ class OrderXDocument extends AbstractService } } - $this->orderxdocument->setDocumentSummation($this->document->amount, $this->document->balance, $invoicing_data->getSubTotal(), $invoicing_data->getTotalSurcharges(), $invoicing_data->getTotalDiscount(), $invoicing_data->getSubTotal(), $invoicing_data->getItemTotalTaxes(), 0.0, $this->document->amount - $this->document->balance); + $this->orderxdocument->setDocumentSummation( + $this->document->amount, + $this->document->balance, + $invoicing_data->getSubTotal(), + $invoicing_data->getTotalSurcharges(), + // $invoicing_data->getTotalDiscount(), + $invoicing_data->getSubTotal(), + $invoicing_data->getItemTotalTaxes(), + // 0.0, + // ($this->document->amount - $this->document->balance) + ); foreach ($this->tax_map as $item) { $this->orderxdocument->addDocumentTax($item["tax_type"], "VAT", $item["net_amount"], $item["tax_rate"] * $item["net_amount"], $item["tax_rate"] * 100); diff --git a/app/Services/EDocument/Standards/ZugferdEDokument.php b/app/Services/EDocument/Standards/ZugferdEDokument.php index 0b9f776ec435..f54d971ed1b3 100644 --- a/app/Services/EDocument/Standards/ZugferdEDokument.php +++ b/app/Services/EDocument/Standards/ZugferdEDokument.php @@ -25,7 +25,16 @@ class ZugferdEDokument extends AbstractService { public ZugferdDocumentBuilder $xdocument; - public function __construct(public object $document, private readonly bool $returnObject = false, private array $tax_map = []) + + /** + * __construct + * + * \App\Models\Invoice | \App\Models\Quote | \App\Models\PurchaseOrder | \App\Models\Credit $document + * @param bool $returnObject + * @param array $tax_map + * @return void + */ + public function __construct(public \App\Models\Invoice | \App\Models\Quote | \App\Models\PurchaseOrder | \App\Models\Credit $document, private readonly bool $returnObject = false, private array $tax_map = []) { }