mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
commit
afd9c7540d
@ -1 +1 @@
|
|||||||
5.3.57
|
5.3.58
|
@ -94,11 +94,8 @@ class InvoiceItemSum
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Don't round the cost x qty - will allow us to use higher precision costs */
|
|
||||||
private function sumLineItem()
|
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);
|
$this->setLineTotal($this->item->cost * $this->item->quantity);
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -87,7 +87,10 @@ class InvoiceItemSumInclusive
|
|||||||
|
|
||||||
private function sumLineItem()
|
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;
|
return $this;
|
||||||
}
|
}
|
||||||
|
@ -183,6 +183,11 @@ class QuoteController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(count($ids) == 1){
|
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);
|
return redirect()->route('client.quote.show', $quotes->first()->hashed_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -387,6 +387,9 @@ class PreviewController extends BaseController
|
|||||||
'user_id' => auth()->user()->id,
|
'user_id' => auth()->user()->id,
|
||||||
'company_id' => auth()->user()->company()->id,
|
'company_id' => auth()->user()->company()->id,
|
||||||
'client_id' => $client->id,
|
'client_id' => $client->id,
|
||||||
|
'terms' => 'Sample Terms',
|
||||||
|
'footer' => 'Sample Footer',
|
||||||
|
'public_notes' => 'Sample Public Notes',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$invitation = InvoiceInvitation::factory()->create([
|
$invitation = InvoiceInvitation::factory()->create([
|
||||||
|
@ -243,6 +243,9 @@ class PaymentEmailEngine extends BaseEmailEngine
|
|||||||
$data['$invoice.po_number'] = ['value' => $this->formatPoNumber(), 'label' => ctrans('texts.po_number')];
|
$data['$invoice.po_number'] = ['value' => $this->formatPoNumber(), 'label' => ctrans('texts.po_number')];
|
||||||
$data['$poNumber'] = &$data['$invoice.po_number'];
|
$data['$poNumber'] = &$data['$invoice.po_number'];
|
||||||
|
|
||||||
|
$arrKeysLength = array_map('strlen', array_keys($data));
|
||||||
|
array_multisort($arrKeysLength, SORT_DESC, $data);
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ class Gateway extends StaticModel
|
|||||||
break;
|
break;
|
||||||
case 56:
|
case 56:
|
||||||
return [
|
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::BANK_TRANSFER => ['refund' => true, 'token_billing' => true, 'webhooks' => ['source.chargeable','charge.succeeded']],
|
||||||
GatewayType::ALIPAY => ['refund' => false, 'token_billing' => false],
|
GatewayType::ALIPAY => ['refund' => false, 'token_billing' => false],
|
||||||
GatewayType::APPLE_PAY => ['refund' => false, 'token_billing' => false],
|
GatewayType::APPLE_PAY => ['refund' => false, 'token_billing' => false],
|
||||||
|
@ -159,10 +159,10 @@ class Quote extends BaseModel
|
|||||||
return $this->belongsTo(Client::class)->withTrashed();
|
return $this->belongsTo(Client::class)->withTrashed();
|
||||||
}
|
}
|
||||||
|
|
||||||
// public function contacts()
|
public function invoice()
|
||||||
// {
|
{
|
||||||
// return $this->hasManyThrough(ClientContact::class, Client::class);
|
return $this->belongsTo(Invoice::class)->withTrashed();
|
||||||
// }
|
}
|
||||||
|
|
||||||
public function assigned_user()
|
public function assigned_user()
|
||||||
{
|
{
|
||||||
|
@ -14,8 +14,8 @@ return [
|
|||||||
'require_https' => env('REQUIRE_HTTPS', true),
|
'require_https' => env('REQUIRE_HTTPS', true),
|
||||||
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
||||||
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
|
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
|
||||||
'app_version' => '5.3.57',
|
'app_version' => '5.3.58',
|
||||||
'app_tag' => '5.3.57',
|
'app_tag' => '5.3.58',
|
||||||
'minimum_client_version' => '5.0.16',
|
'minimum_client_version' => '5.0.16',
|
||||||
'terms_version' => '1.0.1',
|
'terms_version' => '1.0.1',
|
||||||
'api_secret' => env('API_SECRET', ''),
|
'api_secret' => env('API_SECRET', ''),
|
||||||
|
2
public/css/app.css
vendored
2
public/css/app.css
vendored
File diff suppressed because one or more lines are too long
4
public/flutter_service_worker.js
vendored
4
public/flutter_service_worker.js
vendored
@ -28,11 +28,11 @@ const RESOURCES = {
|
|||||||
"assets/NOTICES": "9a4bf0423a5e265f38c4df37f7a0a913",
|
"assets/NOTICES": "9a4bf0423a5e265f38c4df37f7a0a913",
|
||||||
"assets/fonts/MaterialIcons-Regular.otf": "4e6447691c9509f7acdbf8a931a85ca1",
|
"assets/fonts/MaterialIcons-Regular.otf": "4e6447691c9509f7acdbf8a931a85ca1",
|
||||||
"favicon.ico": "51636d3a390451561744c42188ccd628",
|
"favicon.ico": "51636d3a390451561744c42188ccd628",
|
||||||
"/": "9a6d03b86fbbbe937744bd4e18e8f03a",
|
"/": "d9829928376d8c2193b8af876898ddaa",
|
||||||
"version.json": "a00481850d5c63ba5df4e22636643438",
|
"version.json": "a00481850d5c63ba5df4e22636643438",
|
||||||
"icons/Icon-512.png": "0f9aff01367f0a0c69773d25ca16ef35",
|
"icons/Icon-512.png": "0f9aff01367f0a0c69773d25ca16ef35",
|
||||||
"icons/Icon-192.png": "bb1cf5f6982006952211c7c8404ffbed",
|
"icons/Icon-192.png": "bb1cf5f6982006952211c7c8404ffbed",
|
||||||
"main.dart.js": "299333488d94a781eef76d041cb91148",
|
"main.dart.js": "90f76748bc2c212eb97403132f720821",
|
||||||
"favicon.png": "dca91c54388f52eded692718d5a98b8b",
|
"favicon.png": "dca91c54388f52eded692718d5a98b8b",
|
||||||
"manifest.json": "ef43d90e57aa7682d7e2cfba2f484a40",
|
"manifest.json": "ef43d90e57aa7682d7e2cfba2f484a40",
|
||||||
"canvaskit/profiling/canvaskit.js": "3783918f48ef691e230156c251169480",
|
"canvaskit/profiling/canvaskit.js": "3783918f48ef691e230156c251169480",
|
||||||
|
File diff suppressed because one or more lines are too long
94889
public/main.dart.js
vendored
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
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
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
234800
public/main.next.dart.js
vendored
File diff suppressed because one or more lines are too long
8691
public/main.profile.dart.js
vendored
8691
public/main.profile.dart.js
vendored
File diff suppressed because one or more lines are too long
@ -18,7 +18,7 @@
|
|||||||
"/js/clients/linkify-urls.js": "/js/clients/linkify-urls.js?id=dd6a49267dfe156c3bc9",
|
"/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-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/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/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/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",
|
"/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-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-browserpay.js": "/js/clients/payments/stripe-browserpay.js?id=71e49866d66a6d85b88a",
|
||||||
"/js/clients/payments/stripe-fpx.js": "/js/clients/payments/stripe-fpx.js?id=3a1cac8fb671c2e4337f",
|
"/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",
|
"/css/card-js.min.css": "/css/card-js.min.css?id=62afeb675235451543ad",
|
||||||
"/vendor/clipboard.min.js": "/vendor/clipboard.min.js?id=ad98572d415d2f245284"
|
"/vendor/clipboard.min.js": "/vendor/clipboard.min.js?id=ad98572d415d2f245284"
|
||||||
}
|
}
|
||||||
|
@ -109,6 +109,12 @@ class WePayCreditCard {
|
|||||||
|
|
||||||
completePaymentWithoutToken() {
|
completePaymentWithoutToken() {
|
||||||
if (!this.validateCreditCardFields()) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,7 +174,6 @@ class WePayCreditCard {
|
|||||||
.getElementById('pay-now')
|
.getElementById('pay-now')
|
||||||
.addEventListener('click', () => {
|
.addEventListener('click', () => {
|
||||||
this.payNowButton = document.getElementById('pay-now');
|
this.payNowButton = document.getElementById('pay-now');
|
||||||
|
|
||||||
this.payNowButton.disabled = true;
|
this.payNowButton.disabled = true;
|
||||||
this.payNowButton.querySelector('svg').classList.remove('hidden');
|
this.payNowButton.querySelector('svg').classList.remove('hidden');
|
||||||
this.payNowButton.querySelector('span').classList.add('hidden');
|
this.payNowButton.querySelector('span').classList.add('hidden');
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
<select
|
<select
|
||||||
id="shipping_country"
|
id="shipping_country"
|
||||||
class="input w-full form-select"
|
class="input w-full form-select"
|
||||||
name="shipping_country">
|
name="country_id">
|
||||||
<option value="none"></option>
|
<option value="none"></option>
|
||||||
@foreach(App\Utils\TranslationHelper::getCountries() as $country)
|
@foreach(App\Utils\TranslationHelper::getCountries() as $country)
|
||||||
<option
|
<option
|
||||||
|
@ -86,7 +86,7 @@ class InvoiceTest extends TestCase
|
|||||||
public function testInvoiceTotalsWithDiscountWithSurcharge()
|
public function testInvoiceTotalsWithDiscountWithSurcharge()
|
||||||
{
|
{
|
||||||
$this->invoice->discount = 5;
|
$this->invoice->discount = 5;
|
||||||
$this->invoice->custom_value1 = 5;
|
$this->invoice->custom_surcharge1 = 5;
|
||||||
|
|
||||||
$this->invoice_calc->build();
|
$this->invoice_calc->build();
|
||||||
|
|
||||||
@ -98,21 +98,21 @@ class InvoiceTest extends TestCase
|
|||||||
public function testInvoiceTotalsWithDiscountWithSurchargeWithInclusiveTax()
|
public function testInvoiceTotalsWithDiscountWithSurchargeWithInclusiveTax()
|
||||||
{
|
{
|
||||||
$this->invoice->discount = 5;
|
$this->invoice->discount = 5;
|
||||||
$this->invoice->custom_value1 = 5;
|
$this->invoice->custom_surcharge1 = 5;
|
||||||
$this->invoice->tax_name1 = 'GST';
|
$this->invoice->tax_name1 = 'GST';
|
||||||
$this->invoice->tax_rate1 = 10;
|
$this->invoice->tax_rate1 = 10;
|
||||||
|
|
||||||
$this->invoice_calc->build();
|
$this->invoice_calc->build();
|
||||||
|
|
||||||
$this->assertEquals($this->invoice_calc->getSubTotal(), 20);
|
$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);
|
//$this->assertEquals($this->invoice_calc->getBalance(), 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testInvoiceTotalsWithDiscountWithSurchargeWithExclusiveTax()
|
public function testInvoiceTotalsWithDiscountWithSurchargeWithExclusiveTax()
|
||||||
{
|
{
|
||||||
$this->invoice->discount = 5;
|
$this->invoice->discount = 5;
|
||||||
$this->invoice->custom_value1 = 5;
|
$this->invoice->custom_surcharge1 = 5;
|
||||||
$this->invoice->tax_name1 = 'GST';
|
$this->invoice->tax_name1 = 'GST';
|
||||||
$this->invoice->tax_rate1 = 10;
|
$this->invoice->tax_rate1 = 10;
|
||||||
$this->invoice->uses_inclusive_taxes = false;
|
$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->getSubTotal(), 20);
|
||||||
// $this->assertEquals($this->invoice_calc->getGrossSubTotal(), 22);
|
// $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->getBalance(), 21.5);
|
||||||
//$this->assertEquals($this->invoice_calc->getTotalTaxes(), 1.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_calc = new InvoiceSum($this->invoice);
|
||||||
|
|
||||||
$this->invoice->discount = 5;
|
$this->invoice->discount = 5;
|
||||||
$this->invoice->custom_value1 = 5;
|
$this->invoice->custom_surcharge1 = 5;
|
||||||
$this->invoice->tax_name1 = 'GST';
|
$this->invoice->tax_name1 = 'GST';
|
||||||
$this->invoice->tax_rate1 = 10;
|
$this->invoice->tax_rate1 = 10;
|
||||||
$this->invoice->tax_name2 = 'GST';
|
$this->invoice->tax_name2 = 'GST';
|
||||||
@ -144,7 +144,7 @@ class InvoiceTest extends TestCase
|
|||||||
$this->invoice_calc->build();
|
$this->invoice_calc->build();
|
||||||
|
|
||||||
$this->assertEquals($this->invoice_calc->getSubTotal(), 20);
|
$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->getBalance(), 23);
|
||||||
//$this->assertEquals($this->invoice_calc->getTotalTaxes(), 3);
|
//$this->assertEquals($this->invoice_calc->getTotalTaxes(), 3);
|
||||||
}
|
}
|
||||||
@ -217,8 +217,8 @@ class InvoiceTest extends TestCase
|
|||||||
$this->invoice_calc->build();
|
$this->invoice_calc->build();
|
||||||
|
|
||||||
$this->assertEquals($this->invoice_calc->getSubTotal(), 20);
|
$this->assertEquals($this->invoice_calc->getSubTotal(), 20);
|
||||||
$this->assertEquals($this->invoice_calc->getGrossSubTotal(), 22);
|
// $this->assertEquals($this->invoice_calc->getGrossSubTotal(), 22);
|
||||||
//$this->assertEquals($this->invoice_calc->getTotal(), 26);
|
$this->assertEquals($this->invoice_calc->getTotal(), 26);
|
||||||
//$this->assertEquals($this->invoice_calc->getBalance(), 26);
|
//$this->assertEquals($this->invoice_calc->getBalance(), 26);
|
||||||
//$this->assertEquals($this->invoice_calc->getTotalTaxes(), 4);
|
//$this->assertEquals($this->invoice_calc->getTotalTaxes(), 4);
|
||||||
//$this->assertEquals(count($this->invoice_calc->getTaxMap()), 1);
|
//$this->assertEquals(count($this->invoice_calc->getTaxMap()), 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user