Skip to content

Commit

Permalink
remove zlavomat const dependency in invoice button component
Browse files Browse the repository at this point in the history
remp/crm#1068
+ separate zlavomat invoice message to its own widget
  • Loading branch information
Adam Zoldak committed Mar 11, 2020
1 parent add0eca commit 3ff4bad
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/components/InvoiceButton/invoice_button.latte
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@
<a target="_blank" class="btn btn-sm btn-primary" href="{plink :Invoices:Invoices:DownloadInvoice $payment->id}"><i class="fa fa-download"></i> {_invoices.frontend.invoice_button.download}</a>
{else}
{if $payment->user->invoice == true && !$payment->user->disable_auto_invoice && $paymentInvoicable}
{if $payment->payment_gateway->code === Crm\ZlavomatModule\Gateways\Zlavomat::GATEWAY_CODE}
<span class="label label-info">Faktúru nájdete vo svojom Zľavomat konte</span>
{elseif !$payment->paid_at}
{if !$payment->paid_at}
<span class="alert alert-danger"><i class="fa fa-warning"></i> {_invoices.frontend.invoice_button.system_error}</span>
{elseif (clone $payment->paid_at)->modify('+15 days') > new DateTime('now')}
<a target="_blank" class="btn btn-sm btn-primary" href="{plink :Invoices:Invoices:DownloadInvoice $payment->id}"><i class="fa fa-magic"></i> {_invoices.frontend.invoice_button.generate}</a>
Expand Down

0 comments on commit 3ff4bad

Please sign in to comment.