Merge pull request #7207 from turbo124/v5-stable

v5.3.58
This commit is contained in:
David Bomba 2022-02-13 16:36:18 +11:00 committed by GitHub
commit afd9c7540d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 257788 additions and 256330 deletions

View File

@ -1 +1 @@
5.3.57
5.3.58

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

@ -183,6 +183,11 @@ class QuoteController extends Controller
}
if(count($ids) == 1){
//forward client to the invoice if it exists
if($quote->invoice()->exists())
return redirect()->route('client.invoice.show', $quote->invoice->hashed_id);
return redirect()->route('client.quote.show', $quotes->first()->hashed_id);
}

View File

@ -387,6 +387,9 @@ class PreviewController extends BaseController
'user_id' => auth()->user()->id,
'company_id' => auth()->user()->company()->id,
'client_id' => $client->id,
'terms' => 'Sample Terms',
'footer' => 'Sample Footer',
'public_notes' => 'Sample Public Notes',
]);
$invitation = InvoiceInvitation::factory()->create([

View File

@ -243,6 +243,9 @@ class PaymentEmailEngine extends BaseEmailEngine
$data['$invoice.po_number'] = ['value' => $this->formatPoNumber(), 'label' => ctrans('texts.po_number')];
$data['$poNumber'] = &$data['$invoice.po_number'];
$arrKeysLength = array_map('strlen', array_keys($data));
array_multisort($arrKeysLength, SORT_DESC, $data);
return $data;
}

View File

@ -136,7 +136,7 @@ class Gateway extends StaticModel
break;
case 56:
return [
GatewayType::CREDIT_CARD => ['refund' => true, 'token_billing' => true],
GatewayType::CREDIT_CARD => ['refund' => true, 'token_billing' => true, 'webhooks' => ['payment_intent.succeeded']],
GatewayType::BANK_TRANSFER => ['refund' => true, 'token_billing' => true, 'webhooks' => ['source.chargeable','charge.succeeded']],
GatewayType::ALIPAY => ['refund' => false, 'token_billing' => false],
GatewayType::APPLE_PAY => ['refund' => false, 'token_billing' => false],

View File

@ -159,10 +159,10 @@ class Quote extends BaseModel
return $this->belongsTo(Client::class)->withTrashed();
}
// public function contacts()
// {
// return $this->hasManyThrough(ClientContact::class, Client::class);
// }
public function invoice()
{
return $this->belongsTo(Invoice::class)->withTrashed();
}
public function assigned_user()
{

View File

@ -14,8 +14,8 @@ return [
'require_https' => env('REQUIRE_HTTPS', true),
'app_url' => rtrim(env('APP_URL', ''), '/'),
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
'app_version' => '5.3.57',
'app_tag' => '5.3.57',
'app_version' => '5.3.58',
'app_tag' => '5.3.58',
'minimum_client_version' => '5.0.16',
'terms_version' => '1.0.1',
'api_secret' => env('API_SECRET', ''),

2
public/css/app.css vendored

File diff suppressed because one or more lines are too long

View File

@ -28,11 +28,11 @@ const RESOURCES = {
"assets/NOTICES": "9a4bf0423a5e265f38c4df37f7a0a913",
"assets/fonts/MaterialIcons-Regular.otf": "4e6447691c9509f7acdbf8a931a85ca1",
"favicon.ico": "51636d3a390451561744c42188ccd628",
"/": "9a6d03b86fbbbe937744bd4e18e8f03a",
"/": "d9829928376d8c2193b8af876898ddaa",
"version.json": "a00481850d5c63ba5df4e22636643438",
"icons/Icon-512.png": "0f9aff01367f0a0c69773d25ca16ef35",
"icons/Icon-192.png": "bb1cf5f6982006952211c7c8404ffbed",
"main.dart.js": "299333488d94a781eef76d041cb91148",
"main.dart.js": "90f76748bc2c212eb97403132f720821",
"favicon.png": "dca91c54388f52eded692718d5a98b8b",
"manifest.json": "ef43d90e57aa7682d7e2cfba2f484a40",
"canvaskit/profiling/canvaskit.js": "3783918f48ef691e230156c251169480",

File diff suppressed because one or more lines are too long

94889
public/main.dart.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

87199
public/main.foss.dart.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

88443
public/main.html.dart.js vendored

File diff suppressed because one or more lines are too long

234800
public/main.next.dart.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -18,7 +18,7 @@
"/js/clients/linkify-urls.js": "/js/clients/linkify-urls.js?id=dd6a49267dfe156c3bc9",
"/js/clients/payments/braintree-credit-card.js": "/js/clients/payments/braintree-credit-card.js?id=a334dd9257dd510a1feb",
"/js/clients/payments/braintree-paypal.js": "/js/clients/payments/braintree-paypal.js?id=37950e8a39281d2f596a",
"/js/clients/payments/wepay-credit-card.js": "/js/clients/payments/wepay-credit-card.js?id=ba4d5b7175117ababdb2",
"/js/clients/payments/wepay-credit-card.js": "/js/clients/payments/wepay-credit-card.js?id=916457009e78696019a5",
"/js/clients/payment_methods/wepay-bank-account.js": "/js/clients/payment_methods/wepay-bank-account.js?id=8328c6c32a65cd3e8a3d",
"/js/clients/payments/paytrace-credit-card.js": "/js/clients/payments/paytrace-credit-card.js?id=59d9913b746fe5a540ff",
"/js/clients/payments/mollie-credit-card.js": "/js/clients/payments/mollie-credit-card.js?id=c2cf632fb3cc91b4ff7c",
@ -38,7 +38,7 @@
"/js/clients/payments/stripe-przelewy24.js": "/js/clients/payments/stripe-przelewy24.js?id=e240b907ad163cac04c0",
"/js/clients/payments/stripe-browserpay.js": "/js/clients/payments/stripe-browserpay.js?id=71e49866d66a6d85b88a",
"/js/clients/payments/stripe-fpx.js": "/js/clients/payments/stripe-fpx.js?id=3a1cac8fb671c2e4337f",
"/css/app.css": "/css/app.css?id=cab8a6526b0f9f71842d",
"/css/app.css": "/css/app.css?id=daf6d6885d24b59775d5",
"/css/card-js.min.css": "/css/card-js.min.css?id=62afeb675235451543ad",
"/vendor/clipboard.min.js": "/vendor/clipboard.min.js?id=ad98572d415d2f245284"
}

View File

@ -109,6 +109,12 @@ class WePayCreditCard {
completePaymentWithoutToken() {
if (!this.validateCreditCardFields()) {
this.payNowButton = document.getElementById('pay-now');
this.payNowButton.disabled = false;
this.payNowButton.querySelector('svg').classList.add('hidden');
this.payNowButton.querySelector('span').classList.remove('hidden');
return;
}
@ -168,7 +174,6 @@ class WePayCreditCard {
.getElementById('pay-now')
.addEventListener('click', () => {
this.payNowButton = document.getElementById('pay-now');
this.payNowButton.disabled = true;
this.payNowButton.querySelector('svg').classList.remove('hidden');
this.payNowButton.querySelector('span').classList.add('hidden');

View File

@ -53,7 +53,7 @@
<select
id="shipping_country"
class="input w-full form-select"
name="shipping_country">
name="country_id">
<option value="none"></option>
@foreach(App\Utils\TranslationHelper::getCountries() as $country)
<option

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);