1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Minor fixes

This commit is contained in:
David Bomba 2024-10-11 15:07:20 +11:00
parent 056490fd8f
commit 6bb1f75292
2 changed files with 13 additions and 13 deletions

View File

@ -432,15 +432,20 @@ class Import implements ShouldQueue
}
}
$rules = (new UpdateCompanyRequest())->rules();
// $rules = (new UpdateCompanyRequest())->rules();
unset($rules['expense_mailbox']);
$validator = Validator::make($data, $rules);
// unset($rules['expense_mailbox']);
// unset($rules['e_invoice']);
// unset($rules['smtp_port']);
// unset($rules['settings']);
if ($validator->fails()) {
throw new MigrationValidatorFailed(json_encode($validator->errors()));
}
// $validator = Validator::make($data, $rules);
// nlog($validator->errors());
// if ($validator->fails()) {
// throw new MigrationValidatorFailed(json_encode($validator->errors()));
// }
if (isset($data['account_id'])) {
unset($data['account_id']);

View File

@ -455,12 +455,7 @@ class BaseDriver extends AbstractPaymentDriver
$new_balance = $invoice->balance;
if (floatval($new_balance) - floatval($balance) != 0) {
$adjustment = $new_balance - $balance;
$invoice
->ledger()
->updateInvoiceBalance($adjustment, 'Adjustment for adding gateway fee **Base Driver**');
$adjustment = $new_balance - $balance;
$invoice->client->service()->calculateBalance();
}