Compare commits

...

10 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
33bc9ded65 Bump guzzlehttp/guzzle from 7.4.1 to 7.4.3 (#936)
Bumps [guzzlehttp/guzzle](https://github.com/guzzle/guzzle) from 7.4.1 to 7.4.3.
- [Release notes](https://github.com/guzzle/guzzle/releases)
- [Changelog](https://github.com/guzzle/guzzle/blob/master/CHANGELOG.md)
- [Commits](https://github.com/guzzle/guzzle/compare/7.4.1...7.4.3)

---
updated-dependencies:
- dependency-name: guzzlehttp/guzzle
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-05 14:10:27 +05:30
4271ef451e Php 8 compliant (#914) 2022-06-05 14:09:42 +05:30
6eb44fba93 Update cron.dockerfile (#949) 2022-06-05 14:09:11 +05:30
96e7300583 Make unit clearable (#918) 2022-05-28 11:55:09 +05:30
a479d966d1 Update en.json (#925)
Corrected sentence case from "Expiry date" to "Expiry Date"
2022-05-28 11:54:32 +05:30
34 changed files with 1847 additions and 202 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,24 +2,25 @@
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
{ {
/** /**
* Handle the incoming request. * Handle the incoming request.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @param string $hash * @param string $hash
* @return \Illuminate\Http\JsonResponse * @return \Illuminate\Http\JsonResponse
*/ */
public function __invoke(Request $request, $hash) public function __invoke(Request $request, $hash)
{ {
$company = Company::where('unique_hash', $hash)->first(); $company = Company::where('unique_hash', $hash)->first();
@ -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,24 +2,25 @@
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
{ {
/** /**
* Handle the incoming request. * Handle the incoming request.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @param string $hash * @param string $hash
* @return \Illuminate\Http\JsonResponse * @return \Illuminate\Http\JsonResponse
*/ */
public function __invoke(Request $request, $hash) public function __invoke(Request $request, $hash)
{ {
$company = Company::where('unique_hash', $hash)->first(); $company = Company::where('unique_hash', $hash)->first();
@ -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,24 +2,25 @@
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
{ {
/** /**
* Handle the incoming request. * Handle the incoming request.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @param string $hash * @param string $hash
* @return \Illuminate\Http\JsonResponse * @return \Illuminate\Http\JsonResponse
*/ */
public function __invoke(Request $request, $hash) public function __invoke(Request $request, $hash)
{ {
$company = Company::where('unique_hash', $hash)->first(); $company = Company::where('unique_hash', $hash)->first();
@ -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,25 +2,26 @@
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
{ {
/** /**
* Handle the incoming request. * Handle the incoming request.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @param string $hash * @param string $hash
* @return \Illuminate\Http\JsonResponse * @return \Illuminate\Http\JsonResponse
*/ */
public function __invoke(Request $request, $hash) public function __invoke(Request $request, $hash)
{ {
$company = Company::where('unique_hash', $hash)->first(); $company = Company::where('unique_hash', $hash)->first();
@ -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,24 +2,25 @@
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
{ {
/** /**
* Handle the incoming request. * Handle the incoming request.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @param string $hash * @param string $hash
* @return \Illuminate\Http\JsonResponse * @return \Illuminate\Http\JsonResponse
*/ */
public function __invoke(Request $request, $hash) public function __invoke(Request $request, $hash)
{ {
$company = Company::where('unique_hash', $hash)->first(); $company = Company::where('unique_hash', $hash)->first();
@ -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

@ -39,14 +39,14 @@
"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.0", "friendsofphp/php-cs-fixer": "^3.0",
"fzaninotto/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",
"pestphp/pest": "^1.0", "pestphp/pest": "^1.0",
"pestphp/pest-plugin-faker": "^1.0", "pestphp/pest-plugin-faker": "^1.0",
"pestphp/pest-plugin-laravel": "^1.0", "pestphp/pest-plugin-laravel": "^1.0",
"pestphp/pest-plugin-parallel": "^0.2.1", "pestphp/pest-plugin-parallel": "^0.2.1",
"phpunit/phpunit": "^9.0" "phpunit/phpunit": "^9.3"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
@ -88,4 +88,4 @@
"dont-discover": [] "dont-discover": []
} }
} }
} }

42
composer.lock generated
View File

@ -1639,16 +1639,16 @@
}, },
{ {
"name": "guzzlehttp/guzzle", "name": "guzzlehttp/guzzle",
"version": "7.4.1", "version": "7.4.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/guzzle.git", "url": "https://github.com/guzzle/guzzle.git",
"reference": "ee0a041b1760e6a53d2a39c8c34115adc2af2c79" "reference": "74a8602c6faec9ef74b7a9391ac82c5e65b1cdab"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/ee0a041b1760e6a53d2a39c8c34115adc2af2c79", "url": "https://api.github.com/repos/guzzle/guzzle/zipball/74a8602c6faec9ef74b7a9391ac82c5e65b1cdab",
"reference": "ee0a041b1760e6a53d2a39c8c34115adc2af2c79", "reference": "74a8602c6faec9ef74b7a9391ac82c5e65b1cdab",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1681,12 +1681,12 @@
} }
}, },
"autoload": { "autoload": {
"psr-4": {
"GuzzleHttp\\": "src/"
},
"files": [ "files": [
"src/functions_include.php" "src/functions_include.php"
] ],
"psr-4": {
"GuzzleHttp\\": "src/"
}
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
"license": [ "license": [
@ -1743,7 +1743,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/guzzle/guzzle/issues", "issues": "https://github.com/guzzle/guzzle/issues",
"source": "https://github.com/guzzle/guzzle/tree/7.4.1" "source": "https://github.com/guzzle/guzzle/tree/7.4.3"
}, },
"funding": [ "funding": [
{ {
@ -1759,7 +1759,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-12-06T18:43:05+00:00" "time": "2022-05-25T13:24:33+00:00"
}, },
{ {
"name": "guzzlehttp/promises", "name": "guzzlehttp/promises",
@ -1788,12 +1788,12 @@
} }
}, },
"autoload": { "autoload": {
"psr-4": {
"GuzzleHttp\\Promise\\": "src/"
},
"files": [ "files": [
"src/functions_include.php" "src/functions_include.php"
] ],
"psr-4": {
"GuzzleHttp\\Promise\\": "src/"
}
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
"license": [ "license": [
@ -7657,16 +7657,16 @@
}, },
{ {
"name": "symfony/deprecation-contracts", "name": "symfony/deprecation-contracts",
"version": "v2.5.0", "version": "v2.5.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git", "url": "https://github.com/symfony/deprecation-contracts.git",
"reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8" "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8", "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66",
"reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8", "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -7704,7 +7704,7 @@
"description": "A generic function and convention to trigger deprecation notices", "description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.0" "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.1"
}, },
"funding": [ "funding": [
{ {
@ -7720,7 +7720,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-07-12T14:48:14+00:00" "time": "2022-01-02T09:53:40+00:00"
}, },
{ {
"name": "symfony/error-handler", "name": "symfony/error-handler",
@ -12407,5 +12407,5 @@
"php": "^7.4 || ^8.0" "php": "^7.4 || ^8.0"
}, },
"platform-dev": [], "platform-dev": [],
"plugin-api-version": "2.2.0" "plugin-api-version": "2.3.0"
} }

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,7 +1,7 @@
FROM php:7.4-fpm-alpine FROM php:8.0-fpm-alpine
RUN apk add --no-cache \ RUN apk add --no-cache \
php7-bcmath php8-bcmath
RUN docker-php-ext-install pdo pdo_mysql bcmath RUN docker-php-ext-install pdo pdo_mysql bcmath

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

@ -54,8 +54,6 @@
label="name" label="name"
:options="itemStore.itemUnits" :options="itemStore.itemUnits"
value-prop="id" value-prop="id"
:can-deselect="false"
:can-clear="false"
:placeholder="$t('items.select_a_unit')" :placeholder="$t('items.select_a_unit')"
searchable searchable
track-by="name" track-by="name"

View File

@ -1485,7 +1485,7 @@
"pdf_estimate_label": "Estimate", "pdf_estimate_label": "Estimate",
"pdf_estimate_number": "Estimate Number", "pdf_estimate_number": "Estimate Number",
"pdf_estimate_date": "Estimate Date", "pdf_estimate_date": "Estimate Date",
"pdf_estimate_expire_date": "Expiry date", "pdf_estimate_expire_date": "Expiry Date",
"pdf_invoice_label": "Invoice", "pdf_invoice_label": "Invoice",
"pdf_invoice_number": "Invoice Number", "pdf_invoice_number": "Invoice Number",
"pdf_invoice_date": "Invoice Date", "pdf_invoice_date": "Invoice Date",

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

@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<title>@lang('pdf_invoice_label') - {{$invoice->invoice_number}}</title> <title>@lang('pdf_invoice_label') - {{ $invoice->invoice_number }}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css"> <style type="text/css">
@ -187,7 +187,7 @@
.total-display-table { .total-display-table {
border-top: none; border-top: none;
page-break-inside: avoid; page-break-inside: avoid;
page-break-before: auto; page-break-before: auto;
page-break-after: auto; page-break-after: auto;
@ -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>
@ -312,10 +317,10 @@
<table width="100%"> <table width="100%">
<tr> <tr>
<td width="50%" class="header-section-left"> <td width="50%" class="header-section-left">
@if($logo) @if ($logo)
<img class="header-logo" style="height: 50px;" src="{{ $logo }}" alt="Company Logo"> <img class="header-logo" style="height: 50px;" src="{{ $logo }}" alt="Company Logo">
@else @else
<h1 class="header-logo"> {{$invoice->customer->company->name}} </h1> <h1 class="header-logo"> {{ $invoice->customer->company->name }} </h1>
@endif @endif
</td> </td>
<td width="50%" class="text-right company-address-container company-address"> <td width="50%" class="text-right company-address-container company-address">
@ -331,14 +336,14 @@
<div class="main-content"> <div class="main-content">
<div class="customer-address-container"> <div class="customer-address-container">
<div class="billing-address-container billing-address"> <div class="billing-address-container billing-address">
@if($billing_address) @if ($billing_address)
<b>@lang('pdf_bill_to')</b> <br> <b>@lang('pdf_bill_to')</b> <br>
{!! $billing_address !!} {!! $billing_address !!}
@endif @endif
</div> </div>
<div @if($billing_address !== '</br>') class="shipping-address-container shipping-address" @else class="shipping-address-container--left shipping-address" @endif> <div @if ($billing_address !== '</br>') class="shipping-address-container shipping-address" @else class="shipping-address-container--left shipping-address" @endif>
@if($shipping_address) @if ($shipping_address)
<b>@lang('pdf_ship_to')</b> <br> <b>@lang('pdf_ship_to')</b> <br>
{!! $shipping_address !!} {!! $shipping_address !!}
@endif @endif
@ -350,15 +355,15 @@
<table> <table>
<tr> <tr>
<td class="attribute-label">@lang('pdf_invoice_number')</td> <td class="attribute-label">@lang('pdf_invoice_number')</td>
<td class="attribute-value"> &nbsp;{{$invoice->invoice_number}}</td> <td class="attribute-value"> &nbsp;{{ $invoice->invoice_number }}</td>
</tr> </tr>
<tr> <tr>
<td class="attribute-label">@lang('pdf_invoice_date')</td> <td class="attribute-label">@lang('pdf_invoice_date')</td>
<td class="attribute-value"> &nbsp;{{$invoice->formattedInvoiceDate}}</td> <td class="attribute-value"> &nbsp;{{ $invoice->formattedInvoiceDate }}</td>
</tr> </tr>
<tr> <tr>
<td class="attribute-label">@lang('pdf_invoice_due_date')</td> <td class="attribute-label">@lang('pdf_invoice_due_date')</td>
<td class="attribute-value"> &nbsp;{{$invoice->formattedDueDate}}</td> <td class="attribute-value"> &nbsp;{{ $invoice->formattedDueDate }}</td>
</tr> </tr>
</table> </table>
</div> </div>
@ -368,7 +373,7 @@
@include('app.pdf.invoice.partials.table') @include('app.pdf.invoice.partials.table')
<div class="notes"> <div class="notes">
@if($notes) @if ($notes)
<div class="notes-label"> <div class="notes-label">
@lang('pdf_notes') @lang('pdf_notes')
</div> </div>

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">
@ -11,7 +12,7 @@
border-collapse: collapse; border-collapse: collapse;
} }
.sub-container{ .sub-container {
padding: 0px 20px; padding: 0px 20px;
} }
@ -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">
@ -155,18 +161,18 @@
<div class="expenses-table-container"> <div class="expenses-table-container">
<table class="expenses-table"> <table class="expenses-table">
@foreach ($expenseCategories as $expenseCategory) @foreach ($expenseCategories as $expenseCategory)
<tr> <tr>
<td> <td>
<p class="expense-title"> <p class="expense-title">
{{ $expenseCategory->category->name }} {{ $expenseCategory->category->name }}
</p> </p>
</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>
@endforeach @endforeach
</table> </table>
</div> </div>
@ -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">
@ -11,7 +12,7 @@
border-collapse: collapse; border-collapse: collapse;
} }
.sub-container{ .sub-container {
padding: 0px 20px; padding: 0px 20px;
} }
@ -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>
@ -191,18 +197,18 @@
<div class="expenses-table-container"> <div class="expenses-table-container">
<table class="expenses-table"> <table class="expenses-table">
@foreach ($expenseCategories as $expenseCategory) @foreach ($expenseCategories as $expenseCategory)
<tr> <tr>
<td> <td>
<p class="expense-title"> <p class="expense-title">
{{ $expenseCategory->category->name }} {{ $expenseCategory->category->name }}
</p> </p>
</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>
@endforeach @endforeach
</table> </table>
@ -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">
@ -11,7 +12,7 @@
border-collapse: collapse; border-collapse: collapse;
} }
.sub-container{ .sub-container {
padding: 0px 20px; padding: 0px 20px;
} }
@ -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">
@ -156,34 +163,34 @@
</table> </table>
@foreach ($customers as $customer) @foreach ($customers as $customer)
<p class="sales-customer-name">{{ $customer->name }}</p> <p class="sales-customer-name">{{ $customer->name }}</p>
<div class="sales-table-container"> <div class="sales-table-container">
<table class="sales-table"> <table class="sales-table">
@foreach ($customer->invoices as $invoice) @foreach ($customer->invoices as $invoice)
<tr>
<td>
<p class="sales-information-text">
{{ $invoice->formattedInvoiceDate }} ({{ $invoice->invoice_number }})
</p>
</td>
<td>
<p class="sales-amount">
{!! format_money_pdf($invoice->base_total) !!}
</p>
</td>
</tr>
@endforeach
</table>
</div>
<table class="sales-total-indicator-table">
<tr> <tr>
<td class="sales-total-cell"> <td>
<p class="sales-total-amount"> <p class="sales-information-text">
{!! format_money_pdf($customer->totalAmount) !!} {{ $invoice->formattedInvoiceDate }} ({{ $invoice->invoice_number }})
</p>
</td>
<td>
<p class="sales-amount">
{!! format_money_pdf($invoice->base_total, $currency) !!}
</p> </p>
</td> </td>
</tr> </tr>
@endforeach
</table> </table>
</div>
<table class="sales-total-indicator-table">
<tr>
<td class="sales-total-cell">
<p class="sales-total-amount">
{!! format_money_pdf($customer->totalAmount, $currency) !!}
</p>
</td>
</tr>
</table>
@endforeach @endforeach
</div> </div>
@ -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,17 +1,18 @@
<!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">
body { body {
font-family: "DejaVu Sans"; font-family: "DejaVu Sans";
} }
table { table {
border-collapse: collapse; border-collapse: collapse;
} }
.sub-container{ .sub-container {
padding: 0px 20px; padding: 0px 20px;
} }
@ -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">
@ -154,36 +161,36 @@
</td> </td>
</tr> </tr>
</table> </table>
<p class="sales-items-title">@lang('pdf_items_label')</p> <p class="sales-items-title">@lang('pdf_items_label')</p>
@foreach ($items as $item) @foreach ($items as $item)
<div class="items-table-container"> <div class="items-table-container">
<table class="items-table"> <table class="items-table">
<tr>
<td>
<p class="item-title">
{{ $item->name }}
</p>
</td>
<td>
<p class="item-sales-amount">
{!! format_money_pdf($item->total_amount) !!}
</p>
</td>
</tr>
</table>
</div>
@endforeach
<table class="sales-total-indicator-table">
<tr> <tr>
<td class="sales-total-cell"> <td>
<p class="sales-total-amount"> <p class="item-title">
{!! format_money_pdf($totalAmount) !!} {{ $item->name }}
</p>
</td>
<td>
<p class="item-sales-amount">
{!! format_money_pdf($item->total_amount, $currency) !!}
</p> </p>
</td> </td>
</tr> </tr>
</table> </table>
</div>
@endforeach
<table class="sales-total-indicator-table">
<tr>
<td class="sales-total-cell">
<p class="sales-total-amount">
{!! format_money_pdf($totalAmount, $currency) !!}
</p>
</td>
</tr>
</table>
</div> </div>
@ -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">
@ -11,7 +12,7 @@
border-collapse: collapse; border-collapse: collapse;
} }
.sub-container{ .sub-container {
padding: 0px 20px; padding: 0px 20px;
} }
@ -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">
@ -160,18 +166,18 @@
<div class="tax-table-container"> <div class="tax-table-container">
<table class="tax-table"> <table class="tax-table">
@foreach ($taxTypes as $tax) @foreach ($taxTypes as $tax)
<tr> <tr>
<td> <td>
<p class="tax-title"> <p class="tax-title">
{{ $tax->taxType->name }} {{ $tax->taxType->name }}
</p> </p>
</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>
@endforeach @endforeach
</table> </table>
@ -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