Fix backend code styling

This commit is contained in:
MakingCG
2021-04-29 09:07:05 +00:00
committed by GitHub Actions
parent 1486ce63fa
commit 120973ae00
38 changed files with 542 additions and 605 deletions
+2 -4
View File
@@ -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);
}
}