mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Refactor purchase context and dispatch purchase next
This commit is contained in:
parent
f119c26905
commit
9acdb89ab8
@ -71,7 +71,16 @@ class Methods extends Component
|
||||
'bundle' => $this->context['bundle'],
|
||||
], now()->addMinutes(60));
|
||||
|
||||
$payable_amount = $invoice->partial > 0
|
||||
? \App\Utils\Number::formatValue($invoice->partial, $invoice->client->currency())
|
||||
: \App\Utils\Number::formatValue($invoice->balance, $invoice->client->currency());
|
||||
|
||||
$this->dispatch('purchase.context', property: 'form.company_gateway_id', value: $company_gateway_id);
|
||||
$this->dispatch('purchase.context', property: 'form.payment_method_id', value: $gateway_type_id);
|
||||
$this->dispatch('purchase.context', property: 'form.invoice_hashed_id', value: $invoice->hashed_id);
|
||||
$this->dispatch('purchase.context', property: 'form.payable_amount', value: $payable_amount);
|
||||
|
||||
$this->dispatch('purchase.next');
|
||||
}
|
||||
|
||||
public function render()
|
||||
|
Loading…
x
Reference in New Issue
Block a user