diff --git a/app/Http/ValidationRules/Account/BlackListRule.php b/app/Http/ValidationRules/Account/BlackListRule.php index 25c3629e960d..daa13495e671 100644 --- a/app/Http/ValidationRules/Account/BlackListRule.php +++ b/app/Http/ValidationRules/Account/BlackListRule.php @@ -3492,7 +3492,7 @@ class BlackListRule implements Rule 'zymuying.com', 'zzi.us', 'zzrgg.com', - 'zzz.com',' + 'zzz.com', ]; /** @@ -3500,9 +3500,9 @@ class BlackListRule implements Rule * @param mixed $value * @return bool */ - public function passes($attribute, $value) + public function passes($attribute, $value): bool { - $parts = explode('@', $value); + $parts = explode("@", $value); if (is_array($parts)) { return ! in_array($parts[1], $this->blacklist); @@ -3514,7 +3514,7 @@ class BlackListRule implements Rule /** * @return string */ - public function message() + public function message(): string { return 'This domain is blacklisted, if you think this is in error, please email contact@invoiceninja.com'; } diff --git a/app/Jobs/Bank/MatchBankTransactions.php b/app/Jobs/Bank/MatchBankTransactions.php index 778ba8e64482..5839ecf16c78 100644 --- a/app/Jobs/Bank/MatchBankTransactions.php +++ b/app/Jobs/Bank/MatchBankTransactions.php @@ -118,7 +118,7 @@ class MatchBankTransactions implements ShouldQueue return BankTransaction::whereIn('id', $this->bts); } - private function getInvoices(string $invoice_hashed_ids) + private function getInvoices(string $invoice_hashed_ids): array { $collection = collect(); @@ -132,7 +132,7 @@ class MatchBankTransactions implements ShouldQueue } } - return $collection; + return $collection->toArray(); } private function checkPayable($invoices) :bool @@ -205,7 +205,7 @@ class MatchBankTransactions implements ShouldQueue if ($payment && !$payment->transaction_id) { $payment->transaction_id = $this->bt->id; - $payment->save(); + $payment->saveQuietly(); $this->bt->payment_id = $payment->id; $this->bt->status_id = BankTransaction::STATUS_CONVERTED; @@ -226,10 +226,12 @@ class MatchBankTransactions implements ShouldQueue return $this; } + nlog($this->getInvoices($input['invoice_ids'])); + $_invoices = Invoice::query() ->withTrashed() ->where('company_id', $this->bt->company_id) - ->where('id',$this->getInvoices($input['invoice_ids'])); + ->whereIn('id', $this->getInvoices($input['invoice_ids'])); $amount = $this->bt->amount; @@ -383,7 +385,7 @@ class MatchBankTransactions implements ShouldQueue event(new PaymentWasCreated($payment, $payment->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null))); event(new InvoiceWasPaid($this->invoice, $payment, $payment->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null))); - $this->bt->invoice_ids = collect($invoices)->pluck('hashed_id')->implode(','); + $this->bt->invoice_ids = $invoices->get()->pluck('hashed_id')->implode(','); $this->bt->status_id = BankTransaction::STATUS_CONVERTED; $this->bt->payment_id = $payment->id; $this->bt->save(); diff --git a/app/Notifications/Ninja/EmailSpamNotification.php b/app/Notifications/Ninja/EmailSpamNotification.php index b3b95c7f8ca3..ca355ca87141 100644 --- a/app/Notifications/Ninja/EmailSpamNotification.php +++ b/app/Notifications/Ninja/EmailSpamNotification.php @@ -44,7 +44,6 @@ class EmailSpamNotification extends Notification * Get the mail representation of the notification. * * @param mixed $notifiable - * @return MailMessage */ public function toMail($notifiable) { diff --git a/app/Services/Tax/Providers/ZipTax.php b/app/Services/Tax/Providers/ZipTax.php index f6e9e950bfb9..b6f90815db11 100644 --- a/app/Services/Tax/Providers/ZipTax.php +++ b/app/Services/Tax/Providers/ZipTax.php @@ -33,8 +33,8 @@ class ZipTax implements TaxProviderInterface if($response->successful()) return $response->json(); - if($this->postal_code) { - $response = $this->callApi(['key' => $this->api_key, 'address' => $this->postal_code]); + if(isset($this->address['postal_code'])) { + $response = $this->callApi(['key' => $this->api_key, 'address' => $this->address['postal_code']]); if($response->successful()) return $response->json(); diff --git a/lang/es_ES/texts.php b/lang/es_ES/texts.php index 8d3985f95a48..973161bd50f9 100644 --- a/lang/es_ES/texts.php +++ b/lang/es_ES/texts.php @@ -4949,7 +4949,7 @@ Una vez que tenga los montos, vuelva a esta página de métodos de pago y haga c 'failed' => 'Fallido', 'client_contacts' => 'Contactos del cliente', 'sync_from' => 'sincronizar desde', - 'gateway_payment_text' => 'Facturas: :invoices por importe de :amount del cliente :client', + 'gateway_payment_text' => 'Factura: :invoices por importe de :amount de :client', 'gateway_payment_text_no_invoice' => 'Pago sin factura por importe :amount del cliente :client', 'click_to_variables' => 'Aquí para ver todas las variables del cliente', 'ship_to' => 'Enviar a', @@ -5052,6 +5052,14 @@ Una vez que tenga los montos, vuelva a esta página de métodos de pago y haga c 'here' => 'aquí', 'industry_Restaurant & Catering' => 'Restaurante y Catering', 'show_credits_table' => 'Mostrar tabla de créditos', + 'manual_payment' => 'Pago Manual', + 'tax_summary_report' => 'Informe resumido de impuestos', + 'tax_category' => 'Categoría de impuestos', + 'physical_goods' => 'Bienes físicos', + 'digital_products' => 'Productos digitales', + 'services' => 'Servicios', + 'shipping' => 'Envío', + 'tax_exempt' => 'Exento de impuestos', );