Compare commits

..

5 Commits

Author SHA1 Message Date
0c821b8ae9 Removed telescope service provider file 2022-10-20 19:13:44 +05:30
bbddd88573 fixed report pdf issue 2022-10-15 13:10:56 +05:30
38c4b9ebce Patch setup.sh script to deploy without plugins error. (#1034) 2022-09-13 14:52:51 +05:30
7be59e78e0 Formatting + Netherlands rename (#973)
* Formatting + Netherlands rename

* Revert change
2022-07-09 20:03:08 +05:30
204483836a 🌐Update: support Thai language (#768)
* add thai language config

* update thai translation

* update thai translation

* add THSarabunNew fonts to using in pdf

* update: pdf file to support thai language by checking isLocale('th') and include thai font-family

* update: thai translation

* remove the index.php file (not used)

* move THSarabunNew fonts to resoureces/static/fonts

* Add .gitkeep to storage/fonts to pre-build the fonts directory

Co-authored-by: Ritthikrai (Champ) Wiengchai <ritthikrai.w@aware.co.th>
2022-06-15 18:17:36 +05:30
34 changed files with 3337 additions and 1094 deletions

1
.gitignore vendored
View File

@ -16,3 +16,4 @@ Homestead.yaml
.gitkeep .gitkeep
/public/docs /public/docs
/.scribe /.scribe
!storage/fonts/.gitkeep

View File

@ -2,14 +2,15 @@
namespace Crater\Http\Controllers\V1\Admin\Report; namespace Crater\Http\Controllers\V1\Admin\Report;
use PDF;
use Carbon\Carbon; use Carbon\Carbon;
use Crater\Http\Controllers\Controller;
use Crater\Models\Company; use Crater\Models\Company;
use Crater\Models\CompanySetting; use Crater\Models\Currency;
use Crater\Models\Customer; use Crater\Models\Customer;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Crater\Models\CompanySetting;
use Illuminate\Support\Facades\App; use Illuminate\Support\Facades\App;
use PDF; use Crater\Http\Controllers\Controller;
class CustomerSalesReportController extends Controller class CustomerSalesReportController extends Controller
{ {
@ -56,6 +57,7 @@ class CustomerSalesReportController extends Controller
$dateFormat = CompanySetting::getSetting('carbon_date_format', $company->id); $dateFormat = CompanySetting::getSetting('carbon_date_format', $company->id);
$from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->format($dateFormat); $from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->format($dateFormat);
$to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->format($dateFormat); $to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->format($dateFormat);
$currency = Currency::findOrFail(CompanySetting::getSetting('currency', $company->id));
$colors = [ $colors = [
'primary_text_color', 'primary_text_color',
@ -80,6 +82,7 @@ class CustomerSalesReportController extends Controller
'company' => $company, 'company' => $company,
'from_date' => $from_date, 'from_date' => $from_date,
'to_date' => $to_date, 'to_date' => $to_date,
'currency' => $currency,
]); ]);
$pdf = PDF::loadView('app.pdf.reports.sales-customers'); $pdf = PDF::loadView('app.pdf.reports.sales-customers');

View File

@ -2,14 +2,15 @@
namespace Crater\Http\Controllers\V1\Admin\Report; namespace Crater\Http\Controllers\V1\Admin\Report;
use Carbon\Carbon;
use Crater\Http\Controllers\Controller;
use Crater\Models\Company;
use Crater\Models\CompanySetting;
use Crater\Models\Expense;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\App;
use PDF; use PDF;
use Carbon\Carbon;
use Crater\Models\Company;
use Crater\Models\Expense;
use Crater\Models\Currency;
use Illuminate\Http\Request;
use Crater\Models\CompanySetting;
use Illuminate\Support\Facades\App;
use Crater\Http\Controllers\Controller;
class ExpensesReportController extends Controller class ExpensesReportController extends Controller
{ {
@ -43,6 +44,7 @@ class ExpensesReportController extends Controller
$dateFormat = CompanySetting::getSetting('carbon_date_format', $company->id); $dateFormat = CompanySetting::getSetting('carbon_date_format', $company->id);
$from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->format($dateFormat); $from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->format($dateFormat);
$to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->format($dateFormat); $to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->format($dateFormat);
$currency = Currency::findOrFail(CompanySetting::getSetting('currency', $company->id));
$colors = [ $colors = [
'primary_text_color', 'primary_text_color',
@ -66,6 +68,7 @@ class ExpensesReportController extends Controller
'company' => $company, 'company' => $company,
'from_date' => $from_date, 'from_date' => $from_date,
'to_date' => $to_date, 'to_date' => $to_date,
'currency' => $currency,
]); ]);
$pdf = PDF::loadView('app.pdf.reports.expenses'); $pdf = PDF::loadView('app.pdf.reports.expenses');

View File

@ -2,14 +2,15 @@
namespace Crater\Http\Controllers\V1\Admin\Report; namespace Crater\Http\Controllers\V1\Admin\Report;
use Carbon\Carbon;
use Crater\Http\Controllers\Controller;
use Crater\Models\Company;
use Crater\Models\CompanySetting;
use Crater\Models\InvoiceItem;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\App;
use PDF; use PDF;
use Carbon\Carbon;
use Crater\Models\Company;
use Crater\Models\Currency;
use Illuminate\Http\Request;
use Crater\Models\InvoiceItem;
use Crater\Models\CompanySetting;
use Illuminate\Support\Facades\App;
use Crater\Http\Controllers\Controller;
class ItemSalesReportController extends Controller class ItemSalesReportController extends Controller
{ {
@ -43,6 +44,7 @@ class ItemSalesReportController extends Controller
$dateFormat = CompanySetting::getSetting('carbon_date_format', $company->id); $dateFormat = CompanySetting::getSetting('carbon_date_format', $company->id);
$from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->format($dateFormat); $from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->format($dateFormat);
$to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->format($dateFormat); $to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->format($dateFormat);
$currency = Currency::findOrFail(CompanySetting::getSetting('currency', $company->id));
$colors = [ $colors = [
'primary_text_color', 'primary_text_color',
@ -66,6 +68,7 @@ class ItemSalesReportController extends Controller
'company' => $company, 'company' => $company,
'from_date' => $from_date, 'from_date' => $from_date,
'to_date' => $to_date, 'to_date' => $to_date,
'currency' => $currency,
]); ]);
$pdf = PDF::loadView('app.pdf.reports.sales-items'); $pdf = PDF::loadView('app.pdf.reports.sales-items');

View File

@ -2,15 +2,16 @@
namespace Crater\Http\Controllers\V1\Admin\Report; namespace Crater\Http\Controllers\V1\Admin\Report;
use PDF;
use Carbon\Carbon; use Carbon\Carbon;
use Crater\Http\Controllers\Controller;
use Crater\Models\Company; use Crater\Models\Company;
use Crater\Models\CompanySetting;
use Crater\Models\Expense; use Crater\Models\Expense;
use Crater\Models\Payment; use Crater\Models\Payment;
use Crater\Models\Currency;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Crater\Models\CompanySetting;
use Illuminate\Support\Facades\App; use Illuminate\Support\Facades\App;
use PDF; use Crater\Http\Controllers\Controller;
class ProfitLossReportController extends Controller class ProfitLossReportController extends Controller
{ {
@ -49,6 +50,8 @@ class ProfitLossReportController extends Controller
$dateFormat = CompanySetting::getSetting('carbon_date_format', $company->id); $dateFormat = CompanySetting::getSetting('carbon_date_format', $company->id);
$from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->format($dateFormat); $from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->format($dateFormat);
$to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->format($dateFormat); $to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->format($dateFormat);
$currency = Currency::findOrFail(CompanySetting::getSetting('currency', $company->id));
$colors = [ $colors = [
'primary_text_color', 'primary_text_color',
@ -74,6 +77,7 @@ class ProfitLossReportController extends Controller
'company' => $company, 'company' => $company,
'from_date' => $from_date, 'from_date' => $from_date,
'to_date' => $to_date, 'to_date' => $to_date,
'currency' => $currency,
]); ]);
$pdf = PDF::loadView('app.pdf.reports.profit-loss'); $pdf = PDF::loadView('app.pdf.reports.profit-loss');

View File

@ -2,14 +2,15 @@
namespace Crater\Http\Controllers\V1\Admin\Report; namespace Crater\Http\Controllers\V1\Admin\Report;
use Carbon\Carbon;
use Crater\Http\Controllers\Controller;
use Crater\Models\Company;
use Crater\Models\CompanySetting;
use Crater\Models\Tax;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\App;
use PDF; use PDF;
use Carbon\Carbon;
use Crater\Models\Tax;
use Crater\Models\Company;
use Crater\Models\Currency;
use Illuminate\Http\Request;
use Crater\Models\CompanySetting;
use Illuminate\Support\Facades\App;
use Crater\Http\Controllers\Controller;
class TaxSummaryReportController extends Controller class TaxSummaryReportController extends Controller
{ {
@ -44,6 +45,8 @@ class TaxSummaryReportController extends Controller
$dateFormat = CompanySetting::getSetting('carbon_date_format', $company->id); $dateFormat = CompanySetting::getSetting('carbon_date_format', $company->id);
$from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->format($dateFormat); $from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->format($dateFormat);
$to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->format($dateFormat); $to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->format($dateFormat);
$currency = Currency::findOrFail(CompanySetting::getSetting('currency', $company->id));
$colors = [ $colors = [
'primary_text_color', 'primary_text_color',
@ -68,6 +71,7 @@ class TaxSummaryReportController extends Controller
'company' => $company, 'company' => $company,
'from_date' => $from_date, 'from_date' => $from_date,
'to_date' => $to_date, 'to_date' => $to_date,
'currency' => $currency,
]); ]);
$pdf = PDF::loadView('app.pdf.reports.tax-summary'); $pdf = PDF::loadView('app.pdf.reports.tax-summary');

View File

@ -38,7 +38,7 @@
"barryvdh/laravel-ide-helper": "^2.6", "barryvdh/laravel-ide-helper": "^2.6",
"beyondcode/laravel-dump-server": "^1.0", "beyondcode/laravel-dump-server": "^1.0",
"facade/ignition": "^2.3.6", "facade/ignition": "^2.3.6",
"friendsofphp/php-cs-fixer": "^3.8", "friendsofphp/php-cs-fixer": "^3.0",
"fakerphp/faker": "^1.9.1", "fakerphp/faker": "^1.9.1",
"mockery/mockery": "^1.3.1", "mockery/mockery": "^1.3.1",
"nunomaduro/collision": "^5.0", "nunomaduro/collision": "^5.0",

2345
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -71,6 +71,7 @@ return [
["code" => "cs", "name" => "Czech"], ["code" => "cs", "name" => "Czech"],
["code" => "el", "name" => "Greek"], ["code" => "el", "name" => "Greek"],
["code" => "hr", "name" => "Crotian"], ["code" => "hr", "name" => "Crotian"],
["code" => "th", "name" => "ไทย"],
], ],
/* /*

View File

@ -170,7 +170,7 @@ class CountriesTableSeeder extends Seeder
['id' => 152,'code' => 'NR','name' => "Nauru",'phonecode' => 674], ['id' => 152,'code' => 'NR','name' => "Nauru",'phonecode' => 674],
['id' => 153,'code' => 'NP','name' => "Nepal",'phonecode' => 977], ['id' => 153,'code' => 'NP','name' => "Nepal",'phonecode' => 977],
['id' => 154,'code' => 'AN','name' => "Netherlands Antilles",'phonecode' => 599], ['id' => 154,'code' => 'AN','name' => "Netherlands Antilles",'phonecode' => 599],
['id' => 155,'code' => 'NL','name' => "Netherlands The",'phonecode' => 31], ['id' => 155,'code' => 'NL','name' => "Netherlands",'phonecode' => 31],
['id' => 156,'code' => 'NC','name' => "New Caledonia",'phonecode' => 687], ['id' => 156,'code' => 'NC','name' => "New Caledonia",'phonecode' => 687],
['id' => 157,'code' => 'NZ','name' => "New Zealand",'phonecode' => 64], ['id' => 157,'code' => 'NZ','name' => "New Zealand",'phonecode' => 64],
['id' => 158,'code' => 'NI','name' => "Nicaragua",'phonecode' => 505], ['id' => 158,'code' => 'NI','name' => "Nicaragua",'phonecode' => 505],

View File

@ -1,5 +1,6 @@
#!/bin/sh #!/bin/sh
docker compose exec app composer config --no-plugins allow-plugins.pestphp/pest-plugin true
docker-compose exec app composer install --no-interaction --prefer-dist --optimize-autoloader docker-compose exec app composer install --no-interaction --prefer-dist --optimize-autoloader
docker-compose exec app php artisan storage:link || true docker-compose exec app php artisan storage:link || true

View File

@ -17,7 +17,18 @@
<td class="px-5 py-4 text-left align-top"> <td class="px-5 py-4 text-left align-top">
<div class="flex justify-start"> <div class="flex justify-start">
<div <div
class="flex items-center justify-center w-5 h-5 mt-2 mr-2 text-gray-300 cursor-move handle" class="
flex
items-center
justify-center
w-5
h-5
mt-2
text-gray-300
cursor-move
handle
mr-2
"
> >
<DragIcon /> <DragIcon />
</div> </div>
@ -97,7 +108,7 @@
<BaseIcon <BaseIcon
name="ChevronDownIcon" name="ChevronDownIcon"
class="w-4 h-4 ml-1 text-gray-500" class="w-4 h-4 text-gray-500 ml-1"
/> />
</span> </span>
</BaseButton> </BaseButton>
@ -144,7 +155,7 @@
<BaseContentPlaceholders v-if="loading"> <BaseContentPlaceholders v-if="loading">
<BaseContentPlaceholdersText <BaseContentPlaceholdersText
:lines="1" :lines="1"
class="w-24 h-8 border rounded-md" class="w-24 h-8 rounded-md border"
/> />
</BaseContentPlaceholders> </BaseContentPlaceholders>
@ -164,7 +175,6 @@
:ability="abilities.CREATE_INVOICE" :ability="abilities.CREATE_INVOICE"
:store="store" :store="store"
:store-prop="storeProp" :store-prop="storeProp"
:discount="discount"
@update="updateTax" @update="updateTax"
/> />
</td> </td>

View File

@ -30,13 +30,24 @@
<template v-if="userStore.hasAbilities(ability)" #action> <template v-if="userStore.hasAbilities(ability)" #action>
<button <button
type="button" type="button"
class="flex items-center justify-center w-full px-2 py-2 bg-gray-200 border-none outline-none cursor-pointer " class="
flex
items-center
justify-center
w-full
px-2
cursor-pointer
py-2
bg-gray-200
border-none
outline-none
"
@click="openTaxModal" @click="openTaxModal"
> >
<BaseIcon name="CheckCircleIcon" class="h-5 text-primary-400" /> <BaseIcon name="CheckCircleIcon" class="h-5 text-primary-400" />
<label <label
class="ml-2 text-sm leading-none cursor-pointer text-primary-400" class="ml-2 text-sm leading-none text-primary-400 cursor-pointer"
>{{ $t('invoices.add_new_tax') }}</label >{{ $t('invoices.add_new_tax') }}</label
> >
</button> </button>
@ -104,10 +115,6 @@ const props = defineProps({
type: Number, type: Number,
default: 0, default: 0,
}, },
discountedTotal: {
type: Number,
default: 0,
},
currency: { currency: {
type: [Object, String], type: [Object, String],
required: true, required: true,
@ -146,19 +153,19 @@ const filteredTypes = computed(() => {
}) })
const taxAmount = computed(() => { const taxAmount = computed(() => {
if (localTax.compound_tax && props.discountedTotal) { if (localTax.compound_tax && props.total) {
return ((props.discountedTotal + props.totalTax) * localTax.percent) / 100 return ((props.total + props.totalTax) * localTax.percent) / 100
} }
if (props.discountedTotal && localTax.percent) { if (props.total && localTax.percent) {
return (props.discountedTotal * localTax.percent) / 100 return (props.total * localTax.percent) / 100
} }
return 0 return 0
}) })
watch( watch(
() => props.discountedTotal, () => props.total,
() => { () => {
updateRowTax() updateRowTax()
} }

View File

@ -29,7 +29,14 @@
<label <label
v-else v-else
class="flex items-center justify-center m-0 text-lg text-black uppercase " class="
flex
items-center
justify-center
m-0
text-lg text-black
uppercase
"
> >
<BaseFormatMoney <BaseFormatMoney
:amount="store.getSubTotal" :amount="store.getSubTotal"
@ -59,7 +66,14 @@
<label <label
v-else-if="store[storeProp].tax_per_item === 'YES'" v-else-if="store[storeProp].tax_per_item === 'YES'"
class="flex items-center justify-center m-0 text-lg text-black uppercase " class="
flex
items-center
justify-center
m-0
text-lg text-black
uppercase
"
> >
<BaseFormatMoney :amount="tax.amount" :currency="defaultCurrency" /> <BaseFormatMoney :amount="tax.amount" :currency="defaultCurrency" />
</label> </label>
@ -84,7 +98,7 @@
<BaseContentPlaceholders v-if="isLoading"> <BaseContentPlaceholders v-if="isLoading">
<BaseContentPlaceholdersText <BaseContentPlaceholdersText
:lines="1" :lines="1"
class="w-24 h-8 border rounded-md" class="w-24 h-8 rounded-md border"
/> />
</BaseContentPlaceholders> </BaseContentPlaceholders>
<div v-else class="flex" style="width: 140px" role="group"> <div v-else class="flex" style="width: 140px" role="group">
@ -100,7 +114,7 @@
<BaseDropdown position="bottom-end"> <BaseDropdown position="bottom-end">
<template #activator> <template #activator>
<BaseButton <BaseButton
class="p-2 rounded-none rounded-tr-md rounded-br-md" class="rounded-tr-md rounded-br-md p-2 rounded-none"
type="button" type="button"
variant="white" variant="white"
> >
@ -113,7 +127,7 @@
<BaseIcon <BaseIcon
name="ChevronDownIcon" name="ChevronDownIcon"
class="w-4 h-4 ml-1 text-gray-500" class="w-4 h-4 text-gray-500 ml-1"
/> />
</span> </span>
</BaseButton> </BaseButton>
@ -166,7 +180,15 @@
</div> </div>
<div <div
class="flex items-center justify-between w-full pt-2 mt-5 border-t border-gray-200 border-solid " class="
flex
items-center
justify-between
w-full
pt-2
mt-5
border-t border-gray-200 border-solid
"
> >
<BaseContentPlaceholders v-if="isLoading"> <BaseContentPlaceholders v-if="isLoading">
<BaseContentPlaceholdersText :lines="1" class="w-16 h-5" /> <BaseContentPlaceholdersText :lines="1" class="w-16 h-5" />
@ -182,7 +204,14 @@
</BaseContentPlaceholders> </BaseContentPlaceholders>
<label <label
v-else v-else
class="flex items-center justify-center text-lg uppercase text-primary-400" class="
flex
items-center
justify-center
text-lg
uppercase
text-primary-400
"
> >
<BaseFormatMoney :amount="store.getTotal" :currency="defaultCurrency" /> <BaseFormatMoney :amount="store.getTotal" :currency="defaultCurrency" />
</label> </label>
@ -305,7 +334,6 @@ function selectPercentage() {
function onSelectTax(selectedTax) { function onSelectTax(selectedTax) {
let amount = 0 let amount = 0
if (selectedTax.compound_tax && props.store.getSubtotalWithDiscount) { if (selectedTax.compound_tax && props.store.getSubtotalWithDiscount) {
amount = Math.round( amount = Math.round(
((props.store.getSubtotalWithDiscount + props.store.getTotalSimpleTax) * ((props.store.getSubtotalWithDiscount + props.store.getTotalSimpleTax) *

View File

@ -17,6 +17,7 @@ import sk from './sk.json'
import vi from './vi.json' import vi from './vi.json'
import el from './el.json' import el from './el.json'
import hr from './hr.json' import hr from './hr.json'
import th from './th.json'
export default { export default {
cs, cs,
@ -37,5 +38,6 @@ export default {
vi, vi,
pl, pl,
el, el,
hr hr,
th
} }

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -386,6 +386,10 @@
} }
</style> </style>
@if (App::isLocale('th'))
@include('app.pdf.locale.th')
@endif
</head> </head>
<body> <body>

View File

@ -408,6 +408,10 @@
} }
</style> </style>
@if (App::isLocale('th'))
@include('app.pdf.locale.th')
@endif
</head> </head>
<body> <body>

View File

@ -346,6 +346,10 @@
} }
</style> </style>
@if (App::isLocale('th'))
@include('app.pdf.locale.th')
@endif
</head> </head>
<body> <body>

View File

@ -327,6 +327,10 @@
} }
</style> </style>
@if (App::isLocale('th'))
@include('app.pdf.locale.th')
@endif
</head> </head>
<body> <body>

View File

@ -377,6 +377,10 @@
} }
</style> </style>
@if (App::isLocale('th'))
@include('app.pdf.locale.th')
@endif
</head> </head>
<body> <body>

View File

@ -304,7 +304,12 @@
.pl-0 { .pl-0 {
padding-left: 0; padding-left: 0;
} }
</style> </style>
@if (App::isLocale('th'))
@include('app.pdf.locale.th')
@endif
</head> </head>
<body> <body>

View File

@ -0,0 +1,34 @@
<style type="text/css">
@font-face {
font-family: 'THSarabunNew';
font-style: normal;
font-weight: normal;
src: url("{{ resource_path('static/fonts/THSarabunNew.ttf') }}") format('truetype');
}
@font-face {
font-family: 'THSarabunNew';
font-style: normal;
font-weight: bold;
src: url("{{ resource_path('static/fonts/THSarabunNew-Bold.ttf') }}") format('truetype');
}
@font-face {
font-family: 'THSarabunNew';
font-style: italic;
font-weight: normal;
src: url("{{ resource_path('static/fonts/THSarabunNew-Italic.ttf') }}") format('truetype');
}
@font-face {
font-family: 'THSarabunNew';
font-style: italic;
font-weight: bold;
src: url("{{ resource_path('static/fonts/THSarabunNew-BoldItalic.ttf') }}") format('truetype');
}
body {
font-family: "THSarabunNew", sans-serif !important;
}
</style>

View File

@ -276,6 +276,10 @@
} }
</style> </style>
@if (App::isLocale('th'))
@include('app.pdf.locale.th')
@endif
</head> </head>
<body> <body>

View File

@ -1,5 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<title>@lang('pdf_expense_report_label')</title> <title>@lang('pdf_expense_report_label')</title>
<style type="text/css"> <style type="text/css">
@ -133,7 +134,12 @@
color: #5851D8; color: #5851D8;
} }
</style> </style>
@if (App::isLocale('th'))
@include('app.pdf.locale.th')
@endif
</head> </head>
<body> <body>
<div class="sub-container"> <div class="sub-container">
<table class="report-header"> <table class="report-header">
@ -163,7 +169,7 @@
</td> </td>
<td> <td>
<p class="expense-amount"> <p class="expense-amount">
{!! format_money_pdf($expenseCategory->total_amount) !!} {!! format_money_pdf($expenseCategory->total_amount, $currency) !!}
</p> </p>
</td> </td>
</tr> </tr>
@ -175,7 +181,7 @@
<table class="expense-total-table"> <table class="expense-total-table">
<tr> <tr>
<td class="expense-total-cell"> <td class="expense-total-cell">
<p class="expense-total">{!! format_money_pdf($totalExpense) !!}</p> <p class="expense-total">{!! format_money_pdf($totalExpense, $currency) !!}</p>
</td> </td>
</tr> </tr>
</table> </table>
@ -185,9 +191,10 @@
<p class="report-footer-label">@lang('pdf_total_expenses_label')</p> <p class="report-footer-label">@lang('pdf_total_expenses_label')</p>
</td> </td>
<td> <td>
<p class="report-footer-value">{!! format_money_pdf($totalExpense) !!}</p> <p class="report-footer-value">{!! format_money_pdf($totalExpense, $currency) !!}</p>
</td> </td>
</tr> </tr>
</table> </table>
</body> </body>
</html> </html>

View File

@ -1,5 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<title>@lang('pdf_profit_loss_label')</title> <title>@lang('pdf_profit_loss_label')</title>
<style type="text/css"> <style type="text/css">
@ -158,7 +159,12 @@
color: #5851D8; color: #5851D8;
} }
</style> </style>
@if (App::isLocale('th'))
@include('app.pdf.locale.th')
@endif
</head> </head>
<body> <body>
<div class="sub-container"> <div class="sub-container">
<table class="report-header"> <table class="report-header">
@ -183,7 +189,7 @@
<p class="income-title">@lang("pdf_income_label")</p> <p class="income-title">@lang("pdf_income_label")</p>
</td> </td>
<td> <td>
<p class="income-amount">{!! format_money_pdf($income) !!}</p> <p class="income-amount">{!! format_money_pdf($income, $currency) !!}</p>
</td> </td>
</tr> </tr>
</table> </table>
@ -199,7 +205,7 @@
</td> </td>
<td> <td>
<p class="expense-amount"> <p class="expense-amount">
{!! format_money_pdf($expenseCategory->total_amount) !!} {!! format_money_pdf($expenseCategory->total_amount, $currency) !!}
</p> </p>
</td> </td>
</tr> </tr>
@ -212,7 +218,7 @@
<table class="expense-total-indicator-table"> <table class="expense-total-indicator-table">
<tr> <tr>
<td class="expense-total-cell"> <td class="expense-total-cell">
<p class="expense-total">{!! format_money_pdf($totalExpense) !!}</p> <p class="expense-total">{!! format_money_pdf($totalExpense, $currency) !!}</p>
</td> </td>
</tr> </tr>
</table> </table>
@ -222,9 +228,10 @@
<p class="report-footer-label">@lang("pdf_net_profit_label")</p> <p class="report-footer-label">@lang("pdf_net_profit_label")</p>
</td> </td>
<td> <td>
<p class="report-footer-value">{!! format_money_pdf(($income-$totalExpense)) !!}</p> <p class="report-footer-value">{!! format_money_pdf($income - $totalExpense, $currency) !!}</p>
</td> </td>
</tr> </tr>
</table> </table>
</body> </body>
</html> </html>

View File

@ -1,5 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<title>@lang('pdf_sales_customers_label')</title> <title>@lang('pdf_sales_customers_label')</title>
<style type="text/css"> <style type="text/css">
@ -132,11 +133,17 @@
line-height: 21px; line-height: 21px;
color: #5851D8; color: #5851D8;
} }
.text-center { .text-center {
text-align: center; text-align: center;
} }
</style> </style>
@if (App::isLocale('th'))
@include('app.pdf.locale.th')
@endif
</head> </head>
<body> <body>
<div class="sub-container"> <div class="sub-container">
<table class="report-header"> <table class="report-header">
@ -168,7 +175,7 @@
</td> </td>
<td> <td>
<p class="sales-amount"> <p class="sales-amount">
{!! format_money_pdf($invoice->base_total) !!} {!! format_money_pdf($invoice->base_total, $currency) !!}
</p> </p>
</td> </td>
</tr> </tr>
@ -179,7 +186,7 @@
<tr> <tr>
<td class="sales-total-cell"> <td class="sales-total-cell">
<p class="sales-total-amount"> <p class="sales-total-amount">
{!! format_money_pdf($customer->totalAmount) !!} {!! format_money_pdf($customer->totalAmount, $currency) !!}
</p> </p>
</td> </td>
</tr> </tr>
@ -195,10 +202,11 @@
</td> </td>
<td> <td>
<p class="report-footer-value"> <p class="report-footer-value">
{!! format_money_pdf($totalAmount) !!} {!! format_money_pdf($totalAmount, $currency) !!}
</p> </p>
</td> </td>
</tr> </tr>
</table> </table>
</body> </body>
</html> </html>

View File

@ -1,5 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<title>@lang('pdf_sales_items_label')</title> <title>@lang('pdf_sales_items_label')</title>
<style type="text/css"> <style type="text/css">
@ -132,11 +133,17 @@
line-height: 21px; line-height: 21px;
color: #5851D8; color: #5851D8;
} }
.text-center { .text-center {
text-align: center; text-align: center;
} }
</style> </style>
@if (App::isLocale('th'))
@include('app.pdf.locale.th')
@endif
</head> </head>
<body> <body>
<div class="sub-container"> <div class="sub-container">
<table class="report-header"> <table class="report-header">
@ -167,7 +174,7 @@
</td> </td>
<td> <td>
<p class="item-sales-amount"> <p class="item-sales-amount">
{!! format_money_pdf($item->total_amount) !!} {!! format_money_pdf($item->total_amount, $currency) !!}
</p> </p>
</td> </td>
</tr> </tr>
@ -179,7 +186,7 @@
<tr> <tr>
<td class="sales-total-cell"> <td class="sales-total-cell">
<p class="sales-total-amount"> <p class="sales-total-amount">
{!! format_money_pdf($totalAmount) !!} {!! format_money_pdf($totalAmount, $currency) !!}
</p> </p>
</td> </td>
</tr> </tr>
@ -194,10 +201,11 @@
</td> </td>
<td> <td>
<p class="report-footer-value"> <p class="report-footer-value">
{!! format_money_pdf($totalAmount) !!} {!! format_money_pdf($totalAmount, $currency) !!}
</p> </p>
</td> </td>
</tr> </tr>
</table> </table>
</body> </body>
</html> </html>

View File

@ -1,5 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<title>@lang('pdf_tax_summery_label')</title> <title>@lang('pdf_tax_summery_label')</title>
<style type="text/css"> <style type="text/css">
@ -134,7 +135,12 @@
color: #5851D8; color: #5851D8;
} }
</style> </style>
@if (App::isLocale('th'))
@include('app.pdf.locale.th')
@endif
</head> </head>
<body> <body>
<div class="sub-container"> <div class="sub-container">
<table class="report-header"> <table class="report-header">
@ -168,7 +174,7 @@
</td> </td>
<td> <td>
<p class="tax-amount"> <p class="tax-amount">
{!! format_money_pdf($tax->total_tax_amount) !!} {!! format_money_pdf($tax->total_tax_amount, $currency) !!}
</p> </p>
</td> </td>
</tr> </tr>
@ -182,7 +188,7 @@
<tr> <tr>
<td class="tax-total-cell"> <td class="tax-total-cell">
<p class="tax-total"> <p class="tax-total">
{!! format_money_pdf($totalTaxAmount) !!} {!! format_money_pdf($totalTaxAmount, $currency) !!}
</p> </p>
</td> </td>
</tr> </tr>
@ -194,10 +200,11 @@
</td> </td>
<td> <td>
<p class="report-footer-value"> <p class="report-footer-value">
{!! format_money_pdf($totalTaxAmount) !!} {!! format_money_pdf($totalTaxAmount, $currency) !!}
</p> </p>
</td> </td>
</tr> </tr>
</table> </table>
</body> </body>
</html> </html>

0
storage/fonts/.gitkeep Normal file
View File