mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Fixes for linking multiple invoices
This commit is contained in:
parent
083fb5eac7
commit
48c2d36830
@ -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';
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -44,7 +44,6 @@ class EmailSpamNotification extends Notification
|
||||
* Get the mail representation of the notification.
|
||||
*
|
||||
* @param mixed $notifiable
|
||||
* @return MailMessage
|
||||
*/
|
||||
public function toMail($notifiable)
|
||||
{
|
||||
|
@ -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();
|
||||
|
@ -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',
|
||||
);
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user