1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Disable autocomplete on expiry date of wepay credit cards

This commit is contained in:
David Bomba 2022-02-12 07:35:08 +11:00
parent 4fab0f2256
commit 9cb26120ec
4 changed files with 16 additions and 16 deletions

View File

@ -94,11 +94,8 @@ class InvoiceItemSum
return $this;
}
/* Don't round the cost x qty - will allow us to use higher precision costs */
private function sumLineItem()
{ //todo need to support quantities less than the precision amount
// $this->setLineTotal($this->formatValue($this->item->cost, $this->currency->precision) * $this->formatValue($this->item->quantity, $this->currency->precision));
{
$this->setLineTotal($this->item->cost * $this->item->quantity);
return $this;

View File

@ -87,7 +87,10 @@ class InvoiceItemSumInclusive
private function sumLineItem()
{
$this->setLineTotal($this->formatValue($this->item->cost, $this->currency->precision) * $this->formatValue($this->item->quantity, $this->currency->precision));
$this->setLineTotal($this->item->cost * $this->item->quantity);
//11-02-2022
// $this->setLineTotal($this->formatValue($this->item->cost, $this->currency->precision) * $this->formatValue($this->item->quantity, $this->currency->precision));
return $this;
}

View File

@ -3,8 +3,8 @@
<div class="card-js" id="my-card" data-capture-name="true">
<input class="name" id="cardholder_name" name="card-holders-name" placeholder="{{ ctrans('texts.name')}}" required>
<input class="card-number my-custom-class" id="card_number" name="card-number" required>
<input class="expiry-month" name="expiry-month" id="expiration_month" required>
<input class="expiry-year" name="expiry-year" id="expiration_year" required>
<input class="expiry-month" name="expiry-month" id="expiration_month" role="presentation" autocomplete="off" required>
<input class="expiry-year" name="expiry-year" id="expiration_year" role="presentation" autocomplete="off" required>
<input class="cvc" name="cvc" id="cvv" required>
</div>

View File

@ -86,7 +86,7 @@ class InvoiceTest extends TestCase
public function testInvoiceTotalsWithDiscountWithSurcharge()
{
$this->invoice->discount = 5;
$this->invoice->custom_value1 = 5;
$this->invoice->custom_surcharge1 = 5;
$this->invoice_calc->build();
@ -98,21 +98,21 @@ class InvoiceTest extends TestCase
public function testInvoiceTotalsWithDiscountWithSurchargeWithInclusiveTax()
{
$this->invoice->discount = 5;
$this->invoice->custom_value1 = 5;
$this->invoice->custom_surcharge1 = 5;
$this->invoice->tax_name1 = 'GST';
$this->invoice->tax_rate1 = 10;
$this->invoice_calc->build();
$this->assertEquals($this->invoice_calc->getSubTotal(), 20);
//$this->assertEquals($this->invoice_calc->getTotal(), 20);
// $this->assertEquals($this->invoice_calc->getTotal(), 21.5);
//$this->assertEquals($this->invoice_calc->getBalance(), 20);
}
public function testInvoiceTotalsWithDiscountWithSurchargeWithExclusiveTax()
{
$this->invoice->discount = 5;
$this->invoice->custom_value1 = 5;
$this->invoice->custom_surcharge1 = 5;
$this->invoice->tax_name1 = 'GST';
$this->invoice->tax_rate1 = 10;
$this->invoice->uses_inclusive_taxes = false;
@ -124,7 +124,7 @@ class InvoiceTest extends TestCase
$this->assertEquals($this->invoice_calc->getSubTotal(), 20);
// $this->assertEquals($this->invoice_calc->getGrossSubTotal(), 22);
//$this->assertEquals($this->invoice_calc->getTotal(), 21.5);
$this->assertEquals($this->invoice_calc->getTotal(), 21.5);
//$this->assertEquals($this->invoice_calc->getBalance(), 21.5);
//$this->assertEquals($this->invoice_calc->getTotalTaxes(), 1.5);
}
@ -134,7 +134,7 @@ class InvoiceTest extends TestCase
$this->invoice_calc = new InvoiceSum($this->invoice);
$this->invoice->discount = 5;
$this->invoice->custom_value1 = 5;
$this->invoice->custom_surcharge1 = 5;
$this->invoice->tax_name1 = 'GST';
$this->invoice->tax_rate1 = 10;
$this->invoice->tax_name2 = 'GST';
@ -144,7 +144,7 @@ class InvoiceTest extends TestCase
$this->invoice_calc->build();
$this->assertEquals($this->invoice_calc->getSubTotal(), 20);
//$this->assertEquals($this->invoice_calc->getTotal(), 23);
$this->assertEquals($this->invoice_calc->getTotal(), 23);
//$this->assertEquals($this->invoice_calc->getBalance(), 23);
//$this->assertEquals($this->invoice_calc->getTotalTaxes(), 3);
}
@ -217,8 +217,8 @@ class InvoiceTest extends TestCase
$this->invoice_calc->build();
$this->assertEquals($this->invoice_calc->getSubTotal(), 20);
$this->assertEquals($this->invoice_calc->getGrossSubTotal(), 22);
//$this->assertEquals($this->invoice_calc->getTotal(), 26);
// $this->assertEquals($this->invoice_calc->getGrossSubTotal(), 22);
$this->assertEquals($this->invoice_calc->getTotal(), 26);
//$this->assertEquals($this->invoice_calc->getBalance(), 26);
//$this->assertEquals($this->invoice_calc->getTotalTaxes(), 4);
//$this->assertEquals(count($this->invoice_calc->getTaxMap()), 1);