1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-09 20:52:56 +01:00

Fixes for react release

This commit is contained in:
David Bomba 2024-04-09 19:46:01 +10:00
parent 4721d1dd43
commit 1dc2aa6eac
4 changed files with 13 additions and 13 deletions

View File

@ -38,8 +38,6 @@ jobs:
sudo php artisan cache:clear
sudo find ./vendor/bin/ -type f -exec chmod +x {} \;
sudo find ./ -type d -exec chmod 755 {} \;
sudo rm -f public/main.*
sudo rm -f public/flutter*
- name: Prepare React FrontEnd
run: |

View File

@ -119,7 +119,7 @@ class InvoiceSumInclusive
$this->total_custom_values += $this->valuer($this->invoice->custom_surcharge4);
$this->total += $this->total_custom_values;
nlog($this->total_taxes);
return $this;
}
@ -172,7 +172,8 @@ class InvoiceSumInclusive
$this->total_taxes += $tax;
$this->total_tax_map[] = ['name' => $this->invoice->tax_name3.' '.floatval($this->invoice->tax_rate3).'%', 'total' => $tax];
}
nlog($this->total_taxes);
nlog($this->total_tax_map);
return $this;
}
@ -373,7 +374,7 @@ class InvoiceSumInclusive
$this->total_taxes += $total_line_tax;
}
nlog($this->total_taxes);
return $this;
}

View File

@ -685,7 +685,7 @@ class StripePaymentDriver extends BaseDriver
//payment_intent.succeeded - this will confirm or cancel the payment
if ($request->type === 'payment_intent.succeeded') {
PaymentIntentWebhook::dispatch($request->data, $request->company_key, $this->company_gateway->id)->delay(now()->addSeconds(rand(5, 10)));
PaymentIntentWebhook::dispatch($request->data, $request->company_key, $this->company_gateway->id)->delay(now()->addSeconds(rand(10, 15)));
return response()->json([], 200);
}

View File

@ -105,18 +105,19 @@ class InvoiceInclusiveTest extends TestCase
{
$this->invoice->discount = 5;
$this->invoice->custom_surcharge1 = 5;
$this->invoice->custom_surcharge_tax1 = false;
$this->invoice->tax_name1 = 'GST';
$this->invoice->tax_rate1 = 10;
$this->invoice->is_amount_discount = true;
$this->invoice_calc = new InvoiceSumInclusive($this->invoice);
$this->invoice_calc->build();
nlog($this->invoice->withoutRelations()->toArray());
$this->assertEquals($this->invoice_calc->getSubTotal(), 20);
$this->assertEquals($this->invoice_calc->getTotalTaxes(), 1.36);
$this->assertEquals($this->invoice_calc->getTotal(), 20);
$this->assertEquals($this->invoice_calc->getBalance(), 20);
$calc = $this->invoice->calc();
$this->assertEquals($calc->getSubTotal(), 20);
$this->assertEquals($calc->getTotalTaxes(), 1.36);
$this->assertEquals($calc->getTotal(), 20);
$this->assertEquals($calc->getBalance(), 20);
}
public function testInvoiceTotalsWithPercentDiscountWithSurchargeWithInclusiveTax()