mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 04:01:10 -04:00
Compare commits
5 Commits
fix-tax-is
...
report-pdf
| Author | SHA1 | Date | |
|---|---|---|---|
| 0c821b8ae9 | |||
| bbddd88573 | |||
| 38c4b9ebce | |||
| 7be59e78e0 | |||
| 204483836a |
1
.gitignore
vendored
1
.gitignore
vendored
@ -16,3 +16,4 @@ Homestead.yaml
|
|||||||
.gitkeep
|
.gitkeep
|
||||||
/public/docs
|
/public/docs
|
||||||
/.scribe
|
/.scribe
|
||||||
|
!storage/fonts/.gitkeep
|
||||||
@ -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');
|
||||||
|
|||||||
@ -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');
|
||||||
|
|
||||||
|
|||||||
@ -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');
|
||||||
|
|
||||||
|
|||||||
@ -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');
|
||||||
|
|
||||||
|
|||||||
@ -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');
|
||||||
|
|||||||
@ -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
2345
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -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" => "ไทย"],
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -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],
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -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>
|
||||||
|
|||||||
@ -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()
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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) *
|
||||||
|
|||||||
@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
1525
resources/scripts/locales/th.json
Normal file
1525
resources/scripts/locales/th.json
Normal file
File diff suppressed because it is too large
Load Diff
BIN
resources/static/fonts/THSarabunNew-Bold.ttf
Normal file
BIN
resources/static/fonts/THSarabunNew-Bold.ttf
Normal file
Binary file not shown.
BIN
resources/static/fonts/THSarabunNew-BoldItalic.ttf
Normal file
BIN
resources/static/fonts/THSarabunNew-BoldItalic.ttf
Normal file
Binary file not shown.
BIN
resources/static/fonts/THSarabunNew-Italic.ttf
Normal file
BIN
resources/static/fonts/THSarabunNew-Italic.ttf
Normal file
Binary file not shown.
BIN
resources/static/fonts/THSarabunNew.ttf
Normal file
BIN
resources/static/fonts/THSarabunNew.ttf
Normal file
Binary file not shown.
@ -386,6 +386,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@if (App::isLocale('th'))
|
||||||
|
@include('app.pdf.locale.th')
|
||||||
|
@endif
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@ -408,6 +408,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@if (App::isLocale('th'))
|
||||||
|
@include('app.pdf.locale.th')
|
||||||
|
@endif
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@ -346,6 +346,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@if (App::isLocale('th'))
|
||||||
|
@include('app.pdf.locale.th')
|
||||||
|
@endif
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@ -327,6 +327,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@if (App::isLocale('th'))
|
||||||
|
@include('app.pdf.locale.th')
|
||||||
|
@endif
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@ -377,6 +377,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@if (App::isLocale('th'))
|
||||||
|
@include('app.pdf.locale.th')
|
||||||
|
@endif
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@ -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"> {{$invoice->invoice_number}}</td>
|
<td class="attribute-value"> {{ $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"> {{$invoice->formattedInvoiceDate}}</td>
|
<td class="attribute-value"> {{ $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"> {{$invoice->formattedDueDate}}</td>
|
<td class="attribute-value"> {{ $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>
|
||||||
|
|||||||
34
resources/views/app/pdf/locale/th.blade.php
Normal file
34
resources/views/app/pdf/locale/th.blade.php
Normal 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>
|
||||||
@ -276,6 +276,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@if (App::isLocale('th'))
|
||||||
|
@include('app.pdf.locale.th')
|
||||||
|
@endif
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@ -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>
|
||||||
@ -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>
|
||||||
@ -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>
|
||||||
@ -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>
|
||||||
@ -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
0
storage/fonts/.gitkeep
Normal file
Reference in New Issue
Block a user