mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-20 17:02:16 +00:00
Create invoice form part 1.
This commit is contained in:
@@ -21,7 +21,7 @@ function base64_from_storage_image($filepath)
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!Storage::exists($filepath)) {
|
||||
if (! Storage::exists($filepath)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -84,7 +84,6 @@ function invoice_total_discount($invoice, $format = false)
|
||||
{
|
||||
// Percent discount
|
||||
if ($invoice['discount_type'] === 'percent') {
|
||||
|
||||
$discount = (int) (invoice_total_net($invoice) + invoice_total_tax($invoice)) * ($invoice['discount_rate'] / 100);
|
||||
|
||||
if ($format) {
|
||||
@@ -96,7 +95,6 @@ function invoice_total_discount($invoice, $format = false)
|
||||
|
||||
// Value discount
|
||||
if ($invoice['discount_type'] === 'value') {
|
||||
|
||||
if ($format) {
|
||||
return Cashier::formatAmount($invoice['discount_rate'] * 100, $invoice['currency'], 'cs');
|
||||
}
|
||||
@@ -154,4 +152,4 @@ function invoice_total_tax($invoice, $format = false)
|
||||
function format_to_currency($value, $currency = 'CZK', $locale = 'cs')
|
||||
{
|
||||
return Cashier::formatAmount(((int) $value * 100), $currency, $locale);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user