mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
commit
43250837ff
@ -1 +1 @@
|
||||
5.3.0
|
||||
5.3.1
|
@ -71,7 +71,7 @@ class CompanySettings extends BaseSettings
|
||||
public $inclusive_taxes = false; //@implemented
|
||||
public $quote_footer = ''; //@implmented
|
||||
|
||||
public $translations;
|
||||
public $translations;
|
||||
|
||||
public $counter_number_applied = 'when_saved'; // when_saved , when_sent //@implemented
|
||||
public $quote_number_applied = 'when_saved'; // when_saved , when_sent //@implemented
|
||||
@ -594,7 +594,7 @@ class CompanySettings extends BaseSettings
|
||||
*
|
||||
* @return stdClass The stdClass of PDF variables
|
||||
*/
|
||||
private static function getEntityVariableDefaults() :stdClass
|
||||
public static function getEntityVariableDefaults() :stdClass
|
||||
{
|
||||
$variables = [
|
||||
'client_details' => [
|
||||
@ -676,6 +676,19 @@ class CompanySettings extends BaseSettings
|
||||
'$paid_to_date',
|
||||
'$outstanding',
|
||||
],
|
||||
'statement_invoice_columns' => [
|
||||
'$invoice.number',
|
||||
'$invoice.date',
|
||||
'$due_date',
|
||||
'$total',
|
||||
'$outstanding',
|
||||
],
|
||||
'statement_payment_columns' => [
|
||||
'$invoice.number',
|
||||
'$payment.date',
|
||||
'$method',
|
||||
'$outstanding',
|
||||
],
|
||||
];
|
||||
|
||||
return json_decode(json_encode($variables));
|
||||
|
@ -26,8 +26,16 @@ class PaymentRefundFailed extends Exception
|
||||
*/
|
||||
public function render($request)
|
||||
{
|
||||
|
||||
// $msg = 'Unable to refund the transaction';
|
||||
$msg = ctrans('texts.warning_local_refund');
|
||||
|
||||
if($this->getMessage() && strlen($this->getMessage()) >=1 )
|
||||
$msg = $this->getMessage();
|
||||
|
||||
return response()->json([
|
||||
'message' => 'Unable to refund the transaction',
|
||||
'message' => $msg,
|
||||
], 401);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -43,6 +43,8 @@ class CloneQuoteToInvoiceFactory
|
||||
$invoice->number = null;
|
||||
$invoice->date = now()->format('Y-m-d');
|
||||
$invoice->balance = 0;
|
||||
$invoice->deleted_at = null;
|
||||
|
||||
return $invoice;
|
||||
}
|
||||
}
|
||||
|
@ -44,61 +44,6 @@ class ForgotPasswordController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Password Reset.
|
||||
*
|
||||
*
|
||||
* @OA\Post(
|
||||
* path="/api/v1/reset_password",
|
||||
* operationId="reset_password",
|
||||
* tags={"reset_password"},
|
||||
* summary="Attempts to reset the users password",
|
||||
* description="Resets a users email password",
|
||||
* @OA\Parameter(ref="#/components/parameters/X-Api-Secret"),
|
||||
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
|
||||
* @OA\RequestBody(
|
||||
* description="Password reset email",
|
||||
* required=true,
|
||||
* @OA\MediaType(
|
||||
* mediaType="application/json",
|
||||
* @OA\Schema(
|
||||
* type="object",
|
||||
* @OA\Property(
|
||||
* property="email",
|
||||
* description="The user email address",
|
||||
* type="string",
|
||||
* )
|
||||
* )
|
||||
* )
|
||||
* ),
|
||||
* @OA\Response(
|
||||
* response=201,
|
||||
* description="The Reset response",
|
||||
* @OA\Header(header="X-MINIMUM-CLIENT-VERSION", ref="#/components/headers/X-MINIMUM-CLIENT-VERSION"),
|
||||
* @OA\Header(header="X-RateLimit-Remaining", ref="#/components/headers/X-RateLimit-Remaining"),
|
||||
* @OA\Header(header="X-RateLimit-Limit", ref="#/components/headers/X-RateLimit-Limit"),
|
||||
* @OA\JsonContent(
|
||||
* @OA\Items(
|
||||
* type="string",
|
||||
* example="Reset link send to your email.",
|
||||
* )
|
||||
* ),
|
||||
* ),
|
||||
* @OA\Response(
|
||||
* response=401,
|
||||
* description="Validation error",
|
||||
* @OA\JsonContent(
|
||||
* @OA\Items(
|
||||
* type="string",
|
||||
* example="Unable to send password reset link",
|
||||
* ),
|
||||
* ),
|
||||
* ),
|
||||
* @OA\Response(
|
||||
* response="default",
|
||||
* description="Unexpected Error",
|
||||
* @OA\JsonContent(ref="#/components/schemas/Error"),
|
||||
* ),
|
||||
* )
|
||||
* @param Request $request
|
||||
* @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse
|
||||
* @throws \Illuminate\Validation\ValidationException
|
||||
|
@ -768,7 +768,9 @@ class BaseController extends Controller
|
||||
case 'last':
|
||||
return 'main.last.dart.js';
|
||||
case 'next':
|
||||
return 'main.next.dart.js';
|
||||
return 'main.next.dart.js';
|
||||
case 'profile':
|
||||
return 'main.profile.dart.js';
|
||||
default:
|
||||
return 'main.dart.js';
|
||||
}
|
||||
|
@ -521,16 +521,6 @@ class ClientController extends BaseController
|
||||
return $this->listResponse(Client::withTrashed()->whereIn('id', $this->transformKeys($ids)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a client statement.
|
||||
*
|
||||
* @return void [type] [description]
|
||||
*/
|
||||
public function statement()
|
||||
{
|
||||
//todo
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
@ -595,64 +585,5 @@ class ClientController extends BaseController
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param UploadClientRequest $request
|
||||
* @param Client $client
|
||||
* @return Response
|
||||
*
|
||||
*
|
||||
*
|
||||
* @OA\Put(
|
||||
* path="/api/v1/clients/{id}/adjust_ledger",
|
||||
* operationId="adjustLedger",
|
||||
* tags={"clients"},
|
||||
* summary="Adjust the client ledger to rebalance",
|
||||
* description="Adjust the client ledger to rebalance",
|
||||
* @OA\Parameter(ref="#/components/parameters/X-Api-Secret"),
|
||||
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
|
||||
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
|
||||
* @OA\Parameter(ref="#/components/parameters/include"),
|
||||
* @OA\Parameter(
|
||||
* name="id",
|
||||
* in="path",
|
||||
* description="The Client Hashed ID",
|
||||
* example="D2J234DFA",
|
||||
* required=true,
|
||||
* @OA\Schema(
|
||||
* type="string",
|
||||
* format="string",
|
||||
* ),
|
||||
* ),
|
||||
* @OA\Response(
|
||||
* response=200,
|
||||
* description="Returns the client object",
|
||||
* @OA\Header(header="X-MINIMUM-CLIENT-VERSION", ref="#/components/headers/X-MINIMUM-CLIENT-VERSION"),
|
||||
* @OA\Header(header="X-RateLimit-Remaining", ref="#/components/headers/X-RateLimit-Remaining"),
|
||||
* @OA\Header(header="X-RateLimit-Limit", ref="#/components/headers/X-RateLimit-Limit"),
|
||||
* @OA\JsonContent(ref="#/components/schemas/Client"),
|
||||
* ),
|
||||
* @OA\Response(
|
||||
* response=422,
|
||||
* description="Validation error",
|
||||
* @OA\JsonContent(ref="#/components/schemas/ValidationError"),
|
||||
*
|
||||
* ),
|
||||
* @OA\Response(
|
||||
* response="default",
|
||||
* description="Unexpected Error",
|
||||
* @OA\JsonContent(ref="#/components/schemas/Error"),
|
||||
* ),
|
||||
* )
|
||||
*/
|
||||
//@deprecated - not available
|
||||
public function adjustLedger(AdjustClientLedgerRequest $request, Client $client)
|
||||
{
|
||||
// $adjustment = $request->input('adjustment');
|
||||
// $notes = $request->input('notes');
|
||||
|
||||
// $client->service()->updateBalance
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -11,31 +11,197 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
/**
|
||||
* Class ClientStatementController.
|
||||
*/
|
||||
use App\Http\Requests\Statements\CreateStatementRequest;
|
||||
use App\Models\Design;
|
||||
use App\Models\InvoiceInvitation;
|
||||
use App\Services\PdfMaker\Design as PdfDesignModel;
|
||||
use App\Services\PdfMaker\Design as PdfMakerDesign;
|
||||
use App\Services\PdfMaker\PdfMaker as PdfMakerService;
|
||||
use App\Utils\HostedPDF\NinjaPdf;
|
||||
use App\Utils\HtmlEngine;
|
||||
use App\Utils\PhantomJS\Phantom;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
use App\Utils\Traits\Pdf\PdfMaker;
|
||||
|
||||
class ClientStatementController extends BaseController
|
||||
{
|
||||
use MakesHash, PdfMaker;
|
||||
|
||||
/** @var \App\Models\Invoice|\App\Models\Payment */
|
||||
protected $entity;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays a client statement view for a given
|
||||
* client_id.
|
||||
* @return void
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param CreateStatementRequest $request
|
||||
* @return Response
|
||||
*
|
||||
* @OA\Post(
|
||||
* path="/api/v1/client_statement",
|
||||
* operationId="clientStatement",
|
||||
* tags={"clients"},
|
||||
* summary="Return a PDF of the client statement",
|
||||
* description="Return a PDF of the client statement",
|
||||
* @OA\Parameter(ref="#/components/parameters/X-Api-Secret"),
|
||||
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
|
||||
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
|
||||
* @OA\Parameter(ref="#/components/parameters/include"),
|
||||
* @OA\RequestBody(
|
||||
* description="Statment Options",
|
||||
* required=true,
|
||||
* @OA\MediaType(
|
||||
* mediaType="application/json",
|
||||
* @OA\Schema(
|
||||
* type="object",
|
||||
* @OA\Property(
|
||||
* property="start_date",
|
||||
* description="The start date of the statement period - format Y-m-d",
|
||||
* type="string",
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="end_date",
|
||||
* description="The start date of the statement period - format Y-m-d",
|
||||
* type="string",
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="client_id",
|
||||
* description="The hashed ID of the client",
|
||||
* type="string",
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="show_payments_table",
|
||||
* description="Flag which determines if the payments table is shown",
|
||||
* type="boolean",
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="show_aging_table",
|
||||
* description="Flag which determines if the aging table is shown",
|
||||
* type="boolean",
|
||||
* )
|
||||
* )
|
||||
* )
|
||||
* ),
|
||||
* @OA\Response(
|
||||
* response=200,
|
||||
* description="Returns the client object",
|
||||
* @OA\Header(header="X-MINIMUM-CLIENT-VERSION", ref="#/components/headers/X-MINIMUM-CLIENT-VERSION"),
|
||||
* @OA\Header(header="X-RateLimit-Remaining", ref="#/components/headers/X-RateLimit-Remaining"),
|
||||
* @OA\Header(header="X-RateLimit-Limit", ref="#/components/headers/X-RateLimit-Limit"),
|
||||
* @OA\JsonContent(ref="#/components/schemas/Client"),
|
||||
* ),
|
||||
* @OA\Response(
|
||||
* response=422,
|
||||
* description="Validation error",
|
||||
* @OA\JsonContent(ref="#/components/schemas/ValidationError"),
|
||||
*
|
||||
* ),
|
||||
* @OA\Response(
|
||||
* response="default",
|
||||
* description="Unexpected Error",
|
||||
* @OA\JsonContent(ref="#/components/schemas/Error"),
|
||||
* ),
|
||||
* )
|
||||
*/
|
||||
public function show()
|
||||
|
||||
public function statement(CreateStatementRequest $request)
|
||||
{
|
||||
$pdf = $this->createStatement($request);
|
||||
|
||||
if ($pdf) {
|
||||
return response()->streamDownload(function () use ($pdf) {
|
||||
echo $pdf;
|
||||
}, 'statement.pdf', ['Content-Type' => 'application/pdf']);
|
||||
}
|
||||
|
||||
return response()->json(['message' => 'Something went wrong. Please check logs.']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the show view data dependent on
|
||||
* configured variables.
|
||||
* @return void
|
||||
*/
|
||||
public function update()
|
||||
protected function createStatement(CreateStatementRequest $request): ?string
|
||||
{
|
||||
$invitation = false;
|
||||
|
||||
if ($request->getInvoices()->count() >= 1) {
|
||||
$this->entity = $request->getInvoices()->first();
|
||||
$invitation = $this->entity->invitations->first();
|
||||
}
|
||||
else if ($request->getPayments()->count() >= 1) {
|
||||
$this->entity = $request->getPayments()->first()->invoices->first()->invitations->first();
|
||||
$invitation = $this->entity->invitations->first();
|
||||
}
|
||||
|
||||
$entity_design_id = 1;
|
||||
|
||||
$entity_design_id = $this->entity->design_id
|
||||
? $this->entity->design_id
|
||||
: $this->decodePrimaryKey($this->entity->client->getSetting('invoice_design_id'));
|
||||
|
||||
|
||||
$design = Design::find($entity_design_id);
|
||||
|
||||
if (!$design) {
|
||||
$design = Design::find($entity_design_id);
|
||||
}
|
||||
|
||||
$html = new HtmlEngine($invitation);
|
||||
|
||||
$options = [
|
||||
'start_date' => $request->start_date,
|
||||
'end_date' => $request->end_date,
|
||||
'show_payments_table' => $request->show_payments_table,
|
||||
'show_aging_table' => $request->show_aging_table,
|
||||
];
|
||||
|
||||
if ($design->is_custom) {
|
||||
$options['custom_partials'] = \json_decode(\json_encode($design->design), true);
|
||||
$template = new PdfMakerDesign(PdfDesignModel::CUSTOM, $options);
|
||||
} else {
|
||||
$template = new PdfMakerDesign(strtolower($design->name), $options);
|
||||
}
|
||||
|
||||
$variables = $html->generateLabelsAndValues();
|
||||
|
||||
$state = [
|
||||
'template' => $template->elements([
|
||||
'client' => $this->entity->client,
|
||||
'entity' => $this->entity,
|
||||
'pdf_variables' => (array)$this->entity->company->settings->pdf_variables,
|
||||
'$product' => $design->design->product,
|
||||
'variables' => $variables,
|
||||
'invoices' => $request->getInvoices(),
|
||||
'payments' => $request->getPayments(),
|
||||
'aging' => $request->getAging(),
|
||||
], \App\Services\PdfMaker\Design::STATEMENT),
|
||||
'variables' => $variables,
|
||||
'options' => [],
|
||||
'process_markdown' => $this->entity->client->company->markdown_enabled,
|
||||
];
|
||||
|
||||
$maker = new PdfMakerService($state);
|
||||
|
||||
$maker
|
||||
->design($template)
|
||||
->build();
|
||||
|
||||
$pdf = null;
|
||||
|
||||
try {
|
||||
if (config('ninja.phantomjs_pdf_generation') || config('ninja.pdf_generator') == 'phantom') {
|
||||
$pdf = (new Phantom)->convertHtmlToPdf($maker->getCompiledHTML(true));
|
||||
}
|
||||
else if (config('ninja.invoiceninja_hosted_pdf_generation') || config('ninja.pdf_generator') == 'hosted_ninja') {
|
||||
$pdf = (new NinjaPdf())->build($maker->getCompiledHTML(true));
|
||||
} else {
|
||||
$pdf = $this->makePdf(null, null, $maker->getCompiledHTML(true));
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
nlog(print_r($e->getMessage(), 1));
|
||||
}
|
||||
|
||||
return $pdf;
|
||||
}
|
||||
}
|
||||
|
169
app/Http/Requests/Statements/CreateStatementRequest.php
Normal file
169
app/Http/Requests/Statements/CreateStatementRequest.php
Normal file
@ -0,0 +1,169 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Statements;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
use App\Models\Client;
|
||||
use App\Models\Invoice;
|
||||
use App\Models\Payment;
|
||||
use App\Utils\Number;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class CreateStatementRequest extends Request
|
||||
{
|
||||
use MakesHash;
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return auth()->user()->isAdmin();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'start_date' => 'required|date_format:Y-m-d',
|
||||
'end_date' => 'required|date_format:Y-m-d',
|
||||
'client_id' => 'bail|required|exists:clients,id,company_id,'.auth()->user()->company()->id,
|
||||
'show_payments_table' => 'boolean',
|
||||
'show_aging_table' => 'boolean',
|
||||
];
|
||||
}
|
||||
protected function prepareForValidation()
|
||||
{
|
||||
$input = $this->all();
|
||||
|
||||
$input = $this->decodePrimaryKeys($input);
|
||||
|
||||
$this->replace($input);
|
||||
}
|
||||
/**
|
||||
* The collection of invoices for the statement.
|
||||
*
|
||||
* @return Invoice[]|\Illuminate\Database\Eloquent\Collection
|
||||
*/
|
||||
public function getInvoices()
|
||||
{
|
||||
$input = $this->all();
|
||||
|
||||
// $input['start_date & $input['end_date are available.
|
||||
$client = Client::where('id', $input['client_id'])->first();
|
||||
|
||||
$from = Carbon::parse($input['start_date']);
|
||||
$to = Carbon::parse($input['end_date']);
|
||||
|
||||
return Invoice::where('company_id', auth()->user()->company()->id)
|
||||
->where('client_id', $client->id)
|
||||
->whereIn('status_id', [Invoice::STATUS_SENT, Invoice::STATUS_PARTIAL, Invoice::STATUS_PAID])
|
||||
->whereBetween('date',[$from, $to])
|
||||
->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* The collection of payments for the statement.
|
||||
*
|
||||
* @return Payment[]|\Illuminate\Database\Eloquent\Collection
|
||||
*/
|
||||
public function getPayments()
|
||||
{
|
||||
// $input['start_date & $input['end_date are available.
|
||||
$input = $this->all();
|
||||
|
||||
$client = Client::where('id', $input['client_id'])->first();
|
||||
|
||||
$from = Carbon::parse($input['start_date']);
|
||||
$to = Carbon::parse($input['end_date']);
|
||||
|
||||
return Payment::where('company_id', auth()->user()->company()->id)
|
||||
->where('client_id', $client->id)
|
||||
->whereIn('status_id', [Payment::STATUS_COMPLETED, Payment::STATUS_PARTIALLY_REFUNDED, Payment::STATUS_REFUNDED])
|
||||
->whereBetween('date',[$from, $to])
|
||||
->get();
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The array of aging data.
|
||||
*/
|
||||
public function getAging(): array
|
||||
{
|
||||
return [
|
||||
'0-30' => $this->getAgingAmount('30'),
|
||||
'30-60' => $this->getAgingAmount('60'),
|
||||
'60-90' => $this->getAgingAmount('90'),
|
||||
'90-120' => $this->getAgingAmount('120'),
|
||||
'120+' => $this->getAgingAmount('120+'),
|
||||
];
|
||||
}
|
||||
|
||||
private function getAgingAmount($range)
|
||||
{
|
||||
$input = $this->all();
|
||||
|
||||
$ranges = $this->calculateDateRanges($range);
|
||||
|
||||
$from = $ranges[0];
|
||||
$to = $ranges[1];
|
||||
|
||||
$client = Client::where('id', $input['client_id'])->first();
|
||||
|
||||
$amount = Invoice::where('company_id', auth()->user()->company()->id)
|
||||
->where('client_id', $client->id)
|
||||
->whereIn('status_id', [Invoice::STATUS_SENT, Invoice::STATUS_PARTIAL])
|
||||
->where('balance', '>', 0)
|
||||
->whereBetween('date',[$from, $to])
|
||||
->sum('balance');
|
||||
|
||||
return Number::formatMoney($amount, $client);
|
||||
}
|
||||
|
||||
private function calculateDateRanges($range)
|
||||
{
|
||||
|
||||
$ranges = [];
|
||||
|
||||
switch ($range) {
|
||||
case '30':
|
||||
$ranges[0] = now();
|
||||
$ranges[1] = now()->subDays(30);
|
||||
return $ranges;
|
||||
break;
|
||||
case '60':
|
||||
$ranges[0] = now()->subDays(30);
|
||||
$ranges[1] = now()->subDays(60);
|
||||
return $ranges;
|
||||
break;
|
||||
case '90':
|
||||
$ranges[0] = now()->subDays(60);
|
||||
$ranges[1] = now()->subDays(90);
|
||||
return $ranges;
|
||||
break;
|
||||
case '120':
|
||||
$ranges[0] = now()->subDays(90);
|
||||
$ranges[1] = now()->subDays(120);
|
||||
return $ranges;
|
||||
break;
|
||||
case '120+':
|
||||
$ranges[0] = now()->subDays(120);
|
||||
$ranges[1] = now()->subYears(40);
|
||||
return $ranges;
|
||||
break;
|
||||
default:
|
||||
$ranges[0] = now()->subDays(0);
|
||||
$ranges[1] = now()->subDays(30);
|
||||
return $ranges;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -35,6 +35,7 @@ use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use ZipStream\Option\Archive;
|
||||
use ZipStream\ZipStream;
|
||||
use Illuminate\Support\Facades\App;
|
||||
|
||||
class CompanyExport implements ShouldQueue
|
||||
{
|
||||
@ -478,7 +479,7 @@ class CompanyExport implements ShouldQueue
|
||||
private function zipAndSend()
|
||||
{
|
||||
|
||||
$file_name = date('Y-m-d').'_'.str_replace(' ', '_', $this->company->present()->name() . '_' . $this->company->company_key .'.zip');
|
||||
$file_name = date('Y-m-d').'_'.str_replace([" ", "/"],["_",""], $this->company->present()->name() . '_' . $this->company->company_key .'.zip');
|
||||
|
||||
$path = 'backups';
|
||||
|
||||
@ -499,6 +500,10 @@ class CompanyExport implements ShouldQueue
|
||||
Storage::disk(config('filesystems.default'))->put('backups/'.$file_name, file_get_contents($zip_path));
|
||||
}
|
||||
|
||||
App::forgetInstance('translator');
|
||||
$t = app('translator');
|
||||
$t->replace(Ninja::transformTranslations($this->company->settings));
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new DownloadBackup(Storage::disk(config('filesystems.default'))->url('backups/'.$file_name), $this->company);
|
||||
$nmo->to_user = $this->user;
|
||||
|
@ -984,6 +984,8 @@ class CompanyImport implements ShouldQueue
|
||||
|
||||
$cu_array = (array)$cu;
|
||||
unset($cu_array['id']);
|
||||
unset($cu_array['company_id']);
|
||||
unset($cu_array['user_id']);
|
||||
|
||||
$new_cu = CompanyUser::firstOrNew(
|
||||
['user_id' => $user_id, 'company_id' => $this->company->id],
|
||||
@ -1102,6 +1104,18 @@ class CompanyImport implements ShouldQueue
|
||||
unset($obj_array[$un]);
|
||||
}
|
||||
|
||||
if($class instanceof CompanyGateway){
|
||||
|
||||
if(Ninja::isHosted() && $obj_array['gateway_key'] == 'd14dd26a37cecc30fdd65700bfb55b23'){
|
||||
$obj_array['gateway_key'] = 'd14dd26a47cecc30fdd65700bfb67b34';
|
||||
}
|
||||
|
||||
if(Ninja::isSelfHost() && $obj_array['gateway_key'] == 'd14dd26a47cecc30fdd65700bfb67b34'){
|
||||
$obj_array['gateway_key'] = 'd14dd26a37cecc30fdd65700bfb55b23';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$activity_invitation_key = false;
|
||||
|
||||
if($class == 'App\Models\Activity'){
|
||||
|
@ -72,7 +72,8 @@ class SendRecurring implements ShouldQueue
|
||||
|
||||
$invoice->date = now()->format('Y-m-d');
|
||||
$invoice->due_date = $this->recurring_invoice->calculateDueDate(now()->format('Y-m-d'));
|
||||
|
||||
$invoice->recurring_id = $this->recurring_invoice->id;
|
||||
|
||||
if($invoice->client->getSetting('auto_email_invoice'))
|
||||
{
|
||||
$invoice = $invoice->service()
|
||||
|
@ -95,6 +95,7 @@ class Company extends BaseModel
|
||||
'default_password_timeout',
|
||||
'show_task_end_date',
|
||||
'use_comma_as_decimal_place',
|
||||
'report_include_drafts',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
|
@ -130,7 +130,7 @@ class Credit extends BaseModel
|
||||
|
||||
public function activities()
|
||||
{
|
||||
return $this->hasMany(Activity::class)->orderBy('id', 'DESC')->take(300);
|
||||
return $this->hasMany(Activity::class)->orderBy('id', 'DESC')->take(50);
|
||||
}
|
||||
|
||||
public function company()
|
||||
|
@ -206,7 +206,7 @@ class Invoice extends BaseModel
|
||||
|
||||
public function activities()
|
||||
{
|
||||
return $this->hasMany(Activity::class)->orderBy('id', 'DESC')->take(300);
|
||||
return $this->hasMany(Activity::class)->orderBy('id', 'DESC')->take(50);
|
||||
}
|
||||
|
||||
public function history()
|
||||
|
@ -28,7 +28,7 @@ class ClientPresenter extends EntityPresenter
|
||||
}
|
||||
|
||||
//$contact = $this->entity->primary_contact->first();
|
||||
$contact = $this->entity->contacts->first();
|
||||
$contact = $this->entity->contacts->whereNotNull('email')->first();
|
||||
|
||||
$contact_name = 'No Contact Set';
|
||||
|
||||
|
@ -128,7 +128,7 @@ class Quote extends BaseModel
|
||||
|
||||
public function activities()
|
||||
{
|
||||
return $this->hasMany(Activity::class)->orderBy('id', 'DESC')->take(300);
|
||||
return $this->hasMany(Activity::class)->orderBy('id', 'DESC')->take(50);
|
||||
}
|
||||
|
||||
public function user()
|
||||
|
@ -159,7 +159,7 @@ class RecurringInvoice extends BaseModel
|
||||
|
||||
public function activities()
|
||||
{
|
||||
return $this->hasMany(Activity::class)->orderBy('id', 'DESC')->take(300);
|
||||
return $this->hasMany(Activity::class)->orderBy('id', 'DESC')->take(50);
|
||||
}
|
||||
|
||||
public function history()
|
||||
|
@ -124,24 +124,57 @@ class BraintreePaymentDriver extends BaseDriver
|
||||
{
|
||||
$this->init();
|
||||
|
||||
try {
|
||||
try{
|
||||
|
||||
$response = $this->gateway->transaction()->refund($payment->transaction_reference, $amount);
|
||||
|
||||
return [
|
||||
'transaction_reference' => $response->id,
|
||||
'transaction_response' => json_encode($response),
|
||||
'success' => (bool)$response->success,
|
||||
'description' => $response->status,
|
||||
'code' => 0,
|
||||
];
|
||||
|
||||
} catch (Exception $e) {
|
||||
return [
|
||||
|
||||
$data = [
|
||||
'transaction_reference' => null,
|
||||
'transaction_response' => json_encode($e->getMessage()),
|
||||
'success' => false,
|
||||
'description' => $e->getMessage(),
|
||||
'code' => $e->getCode(),
|
||||
];
|
||||
|
||||
SystemLogger::dispatch(['server_response' => null, 'data' => $data], SystemLog::CATEGORY_GATEWAY_RESPONSE, SystemLog::EVENT_GATEWAY_FAILURE, SystemLog::TYPE_BRAINTREE, $this->client, $this->client->company);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
if($response->success)
|
||||
{
|
||||
|
||||
$data = [
|
||||
'transaction_reference' => $response->id,
|
||||
'transaction_response' => json_encode($response),
|
||||
'success' => (bool)$response->success,
|
||||
'description' => $response->status,
|
||||
'code' => 0,
|
||||
];
|
||||
|
||||
SystemLogger::dispatch(['server_response' => $response, 'data' => $data], SystemLog::CATEGORY_GATEWAY_RESPONSE, SystemLog::EVENT_GATEWAY_SUCCESS, SystemLog::TYPE_BRAINTREE, $this->client, $this->client->company);
|
||||
|
||||
return $data;
|
||||
|
||||
}
|
||||
else{
|
||||
|
||||
$error = $response->errors->deepAll()[0];
|
||||
|
||||
$data = [
|
||||
'transaction_reference' => null,
|
||||
'transaction_response' => $response->errors->deepAll(),
|
||||
'success' => false,
|
||||
'description' => $error->message,
|
||||
'code' => $error->code,
|
||||
];
|
||||
|
||||
SystemLogger::dispatch(['server_response' => $response, 'data' => $data], SystemLog::CATEGORY_GATEWAY_RESPONSE, SystemLog::EVENT_GATEWAY_FAILURE, SystemLog::TYPE_BRAINTREE, $this->client, $this->client->company);
|
||||
|
||||
return $data;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
namespace App\Services\Invoice;
|
||||
|
||||
use App\Events\Invoice\InvoiceWasEmailed;
|
||||
use App\Jobs\Invoice\EmailEntity;
|
||||
use App\Jobs\Entity\EmailEntity;
|
||||
use App\Models\Invoice;
|
||||
use App\Services\AbstractService;
|
||||
use App\Utils\Ninja;
|
||||
|
@ -81,7 +81,7 @@ class RefundPayment
|
||||
|
||||
if ($response['success'] == false) {
|
||||
$this->payment->save();
|
||||
throw new PaymentRefundFailed();
|
||||
throw new PaymentRefundFailed($response['description']);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -13,17 +13,21 @@
|
||||
namespace App\Services\PdfMaker;
|
||||
|
||||
use App\Models\Credit;
|
||||
use App\Models\GatewayType;
|
||||
use App\Models\Invoice;
|
||||
use App\Models\Payment;
|
||||
use App\Models\Quote;
|
||||
use App\Services\PdfMaker\Designs\Utilities\BaseDesign;
|
||||
use App\Services\PdfMaker\Designs\Utilities\DesignHelpers;
|
||||
use App\Utils\Number;
|
||||
use App\Utils\Traits\MakesDates;
|
||||
use App\Utils\Traits\MakesInvoiceValues;
|
||||
use DOMDocument;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class Design extends BaseDesign
|
||||
{
|
||||
use MakesInvoiceValues, DesignHelpers;
|
||||
use MakesInvoiceValues, DesignHelpers, MakesDates;
|
||||
|
||||
/** @var App\Models\Invoice || @var App\Models\Quote */
|
||||
public $entity;
|
||||
@ -43,6 +47,15 @@ class Design extends BaseDesign
|
||||
/** Construct options */
|
||||
public $options;
|
||||
|
||||
/** @var Invoice[] */
|
||||
public $invoices;
|
||||
|
||||
/** @var Payment[] */
|
||||
public $payments;
|
||||
|
||||
/** @var array */
|
||||
public $aging = [];
|
||||
|
||||
const BOLD = 'bold';
|
||||
const BUSINESS = 'business';
|
||||
const CLEAN = 'clean';
|
||||
@ -54,6 +67,9 @@ class Design extends BaseDesign
|
||||
const PLAYFUL = 'playful';
|
||||
const CUSTOM = 'custom';
|
||||
|
||||
const DELIVERY_NOTE = 'delivery_note';
|
||||
const STATEMENT = 'statement';
|
||||
|
||||
public function __construct(string $design = null, array $options = [])
|
||||
{
|
||||
Str::endsWith('.html', $design) ? $this->design = $design : $this->design = "{$design}.html";
|
||||
@ -69,9 +85,7 @@ class Design extends BaseDesign
|
||||
);
|
||||
}
|
||||
|
||||
$path = isset($this->options['custom_path'])
|
||||
? $this->options['custom_path']
|
||||
: config('ninja.designs.base_path');
|
||||
$path = $this->options['custom_path'] ?? config('ninja.designs.base_path');
|
||||
|
||||
return file_get_contents(
|
||||
$path . $this->design
|
||||
@ -115,6 +129,26 @@ class Design extends BaseDesign
|
||||
'id' => 'task-table',
|
||||
'elements' => $this->taskTable(),
|
||||
],
|
||||
'statement-invoice-table' => [
|
||||
'id' => 'statement-invoice-table',
|
||||
'elements' => $this->statementInvoiceTable(),
|
||||
],
|
||||
'statement-invoice-table-totals' => [
|
||||
'id' => 'statement-invoice-table-totals',
|
||||
'elements' => $this->statementInvoiceTableTotals(),
|
||||
],
|
||||
'statement-payment-table' => [
|
||||
'id' => 'statement-payment-table',
|
||||
'elements' => $this->statementPaymentTable(),
|
||||
],
|
||||
'statement-payment-table-totals' => [
|
||||
'id' => 'statement-payment-table-totals',
|
||||
'elements' => $this->statementPaymentTableTotals(),
|
||||
],
|
||||
'statement-aging-table' => [
|
||||
'id' => 'statement-aging-table',
|
||||
'elements' => $this->statementAgingTable(),
|
||||
],
|
||||
'table-totals' => [
|
||||
'id' => 'table-totals',
|
||||
'elements' => $this->tableTotals(),
|
||||
@ -158,7 +192,7 @@ class Design extends BaseDesign
|
||||
{
|
||||
$elements = [];
|
||||
|
||||
if ($this->type == 'delivery_note') {
|
||||
if ($this->type == self::DELIVERY_NOTE) {
|
||||
$elements = [
|
||||
['element' => 'p', 'content' => ctrans('texts.delivery_note'), 'properties' => ['data-ref' => 'delivery_note-label', 'style' => 'font-weight: bold; text-transform: uppercase']],
|
||||
['element' => 'p', 'content' => $this->entity->client->name, 'show_empty' => false, 'properties' => ['data-ref' => 'delivery_note-client.name']],
|
||||
@ -190,6 +224,19 @@ class Design extends BaseDesign
|
||||
|
||||
public function entityDetails(): array
|
||||
{
|
||||
if ($this->type === 'statement') {
|
||||
return [
|
||||
['element' => 'tr', 'properties' => [], 'elements' => [
|
||||
['element' => 'th', 'properties' => [], 'content' => ctrans('texts.statement_date')],
|
||||
['element' => 'th', 'properties' => [], 'content' => $this->options['end_date'] ?? ''],
|
||||
]],
|
||||
['element' => 'tr', 'properties' => [], 'elements' => [
|
||||
['element' => 'th', 'properties' => [], 'content' => '$balance_due_label'],
|
||||
['element' => 'th', 'properties' => [], 'content' => '$balance_due'],
|
||||
]],
|
||||
];
|
||||
}
|
||||
|
||||
$variables = $this->context['pdf_variables']['invoice_details'];
|
||||
|
||||
if ($this->entity instanceof Quote) {
|
||||
@ -203,7 +250,7 @@ class Design extends BaseDesign
|
||||
$elements = [];
|
||||
|
||||
// We don't want to show account balance or invoice total on PDF.. or any amount with currency.
|
||||
if ($this->type == 'delivery_note') {
|
||||
if ($this->type == self::DELIVERY_NOTE) {
|
||||
$variables = array_filter($variables, function ($m) {
|
||||
return !in_array($m, ['$invoice.balance_due', '$invoice.total']);
|
||||
});
|
||||
@ -231,7 +278,7 @@ class Design extends BaseDesign
|
||||
|
||||
public function deliveryNoteTable(): array
|
||||
{
|
||||
if ($this->type !== 'delivery_note') {
|
||||
if ($this->type !== self::DELIVERY_NOTE) {
|
||||
return [];
|
||||
}
|
||||
|
||||
@ -241,7 +288,7 @@ class Design extends BaseDesign
|
||||
['element' => 'th', 'content' => '$description_label', 'properties' => ['data-ref' => 'delivery_note-description_label']],
|
||||
['element' => 'th', 'content' => '$product.quantity_label', 'properties' => ['data-ref' => 'delivery_note-product.quantity_label']],
|
||||
]],
|
||||
['element' => 'tbody', 'elements' => $this->buildTableBody('delivery_note')],
|
||||
['element' => 'tbody', 'elements' => $this->buildTableBody(self::DELIVERY_NOTE)],
|
||||
];
|
||||
}
|
||||
|
||||
@ -260,7 +307,7 @@ class Design extends BaseDesign
|
||||
return [];
|
||||
}
|
||||
|
||||
if ($this->type == 'delivery_note') {
|
||||
if ($this->type === self::DELIVERY_NOTE || $this->type === self::STATEMENT) {
|
||||
return [];
|
||||
}
|
||||
|
||||
@ -285,7 +332,7 @@ class Design extends BaseDesign
|
||||
return [];
|
||||
}
|
||||
|
||||
if ($this->type == 'delivery_note') {
|
||||
if ($this->type === self::DELIVERY_NOTE || $this->type === self::STATEMENT) {
|
||||
return [];
|
||||
}
|
||||
|
||||
@ -295,6 +342,124 @@ class Design extends BaseDesign
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Parent method for building invoices table within statement.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function statementInvoiceTable(): array
|
||||
{
|
||||
if (is_null($this->invoices) || $this->type !== self::STATEMENT) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$tbody = [];
|
||||
|
||||
foreach ($this->invoices as $invoice) {
|
||||
$element = ['element' => 'tr', 'elements' => []];
|
||||
|
||||
$element['elements'][] = ['element' => 'td', 'content' => $invoice->number];
|
||||
$element['elements'][] = ['element' => 'td', 'content' => $this->translateDate($invoice->date, $invoice->client->date_format(), $invoice->client->locale()) ?: ' '];
|
||||
$element['elements'][] = ['element' => 'td', 'content' => $this->translateDate($invoice->due_date, $invoice->client->date_format(), $invoice->client->locale()) ?: ' '];
|
||||
$element['elements'][] = ['element' => 'td', 'content' => Number::formatMoney($invoice->amount, $invoice->client) ?: ' '];
|
||||
$element['elements'][] = ['element' => 'td', 'content' => Number::formatMoney($invoice->balance, $invoice->client) ?: ' '];
|
||||
|
||||
$tbody[] = $element;
|
||||
}
|
||||
|
||||
return [
|
||||
['element' => 'thead', 'elements' => $this->buildTableHeader('statement_invoice')],
|
||||
['element' => 'tbody', 'elements' => $tbody],
|
||||
];
|
||||
}
|
||||
|
||||
public function statementInvoiceTableTotals(): array
|
||||
{
|
||||
if ($this->type !== self::STATEMENT) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$outstanding = $this->invoices->sum('amount');
|
||||
|
||||
return [
|
||||
['element' => 'p', 'content' => '$outstanding_label: $outstanding'],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Parent method for building payments table within statement.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function statementPaymentTable(): array
|
||||
{
|
||||
if (is_null($this->payments) && $this->type !== self::STATEMENT) {
|
||||
return [];
|
||||
}
|
||||
|
||||
if (\array_key_exists('show_payments_table', $this->options) && $this->options['show_payments_table'] === false) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$tbody = [];
|
||||
|
||||
foreach ($this->payments as $payment) {
|
||||
foreach ($payment->invoices as $invoice) {
|
||||
$element = ['element' => 'tr', 'elements' => []];
|
||||
|
||||
$element['elements'][] = ['element' => 'td', 'content' => $invoice->number];
|
||||
$element['elements'][] = ['element' => 'td', 'content' => $this->translateDate($payment->date, $payment->client->date_format(), $payment->client->locale()) ?: ' '];
|
||||
$element['elements'][] = ['element' => 'td', 'content' => $payment->type ? $payment->type->name : ctrans('texts.manual_entry')];
|
||||
$element['elements'][] = ['element' => 'td', 'content' => Number::formatMoney($payment->amount, $payment->client) ?: ' '];
|
||||
|
||||
$tbody[] = $element;
|
||||
}
|
||||
}
|
||||
|
||||
return [
|
||||
['element' => 'thead', 'elements' => $this->buildTableHeader('statement_payment')],
|
||||
['element' => 'tbody', 'elements' => $tbody],
|
||||
];
|
||||
}
|
||||
|
||||
public function statementPaymentTableTotals(): array
|
||||
{
|
||||
if ($this->type !== self::STATEMENT || !$this->payments->first()) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$payment = $this->payments->first();
|
||||
|
||||
return [
|
||||
['element' => 'p', 'content' => \sprintf('%s: %s', ctrans('texts.amount_paid'), Number::formatMoney($this->payments->sum('amount'), $payment->client))],
|
||||
];
|
||||
}
|
||||
|
||||
public function statementAgingTable(): array
|
||||
{
|
||||
if ($this->type !== self::STATEMENT) {
|
||||
return [];
|
||||
}
|
||||
|
||||
if (\array_key_exists('show_aging_table', $this->options) && $this->options['show_aging_table'] === false) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$elements = [
|
||||
['element' => 'thead', 'elements' => []],
|
||||
['element' => 'tbody', 'elements' => [
|
||||
['element' => 'tr', 'elements' => []],
|
||||
]],
|
||||
];
|
||||
|
||||
foreach ($this->aging as $column => $value) {
|
||||
$elements[0]['elements'][] = ['element' => 'th', 'content' => $column];
|
||||
$elements[1]['elements'][] = ['element' => 'td', 'content' => $value];
|
||||
}
|
||||
|
||||
return $elements;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate the structure of table headers. (<thead/>)
|
||||
*
|
||||
@ -354,7 +519,7 @@ class Design extends BaseDesign
|
||||
return [];
|
||||
}
|
||||
|
||||
if ($type == 'delivery_note') {
|
||||
if ($type == self::DELIVERY_NOTE) {
|
||||
foreach ($items as $row) {
|
||||
$element = ['element' => 'tr', 'elements' => []];
|
||||
|
||||
@ -453,7 +618,7 @@ class Design extends BaseDesign
|
||||
['element' => 'div', 'properties' => ['class' => 'totals-table-right-side', 'dir' => '$dir'], 'elements' => []],
|
||||
];
|
||||
|
||||
if ($this->type == 'delivery_note') {
|
||||
if ($this->type == self::DELIVERY_NOTE || $this->type == self::STATEMENT) {
|
||||
return $elements;
|
||||
}
|
||||
|
||||
|
@ -28,6 +28,8 @@ trait DesignHelpers
|
||||
|
||||
public function setup(): self
|
||||
{
|
||||
$this->syncPdfVariables();
|
||||
|
||||
if (isset($this->context['client'])) {
|
||||
$this->client = $this->context['client'];
|
||||
}
|
||||
@ -36,11 +38,38 @@ trait DesignHelpers
|
||||
$this->entity = $this->context['entity'];
|
||||
}
|
||||
|
||||
if (isset($this->context['invoices'])) {
|
||||
$this->invoices = $this->context['invoices'];
|
||||
$this->entity = $this->invoices->first();
|
||||
}
|
||||
|
||||
if (isset($this->context['payments'])) {
|
||||
$this->payments = $this->context['payments'];
|
||||
}
|
||||
|
||||
if (isset($this->context['aging'])) {
|
||||
$this->aging = $this->context['aging'];
|
||||
}
|
||||
|
||||
$this->document();
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
protected function syncPdfVariables(): void
|
||||
{
|
||||
$default = (array) \App\DataMapper\CompanySettings::getEntityVariableDefaults();
|
||||
$variables = $this->context['pdf_variables'];
|
||||
|
||||
foreach ($default as $property => $value) {
|
||||
if (array_key_exists($property, $variables)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$variables[$property] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize local dom document instance. Used for getting raw HTML out of template.
|
||||
*
|
||||
|
@ -60,7 +60,7 @@ class CreateInvitations
|
||||
|
||||
private function createBlankContact()
|
||||
{
|
||||
$new_contact = ClientContacstFactory::create($this->quote->company_id, $this->quote->user_id);
|
||||
$new_contact = ClientContactFactory::create($this->quote->company_id, $this->quote->user_id);
|
||||
$new_contact->client_id = $this->quote->client_id;
|
||||
$new_contact->contact_key = Str::random(40);
|
||||
$new_contact->is_primary = true;
|
||||
|
@ -161,6 +161,7 @@ class CompanyTransformer extends EntityTransformer
|
||||
'show_task_end_date' => (bool) $company->show_task_end_date,
|
||||
'markdown_enabled' => (bool) $company->markdown_enabled,
|
||||
'use_comma_as_decimal_place' => (bool) $company->use_comma_as_decimal_place,
|
||||
'report_include_drafts' => (bool) $company->report_include_drafts,
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ class CreditTransformer extends EntityTransformer
|
||||
|
||||
protected $availableIncludes = [
|
||||
'invitations',
|
||||
'history',
|
||||
// 'history',
|
||||
// 'client',
|
||||
'documents',
|
||||
'activities',
|
||||
|
@ -32,7 +32,7 @@ class InvoiceTransformer extends EntityTransformer
|
||||
|
||||
protected $availableIncludes = [
|
||||
// 'invitations',
|
||||
'history',
|
||||
// 'history',
|
||||
'payments',
|
||||
'client',
|
||||
'activities',
|
||||
|
@ -31,7 +31,7 @@ class QuoteTransformer extends EntityTransformer
|
||||
protected $availableIncludes = [
|
||||
'invitations',
|
||||
'documents',
|
||||
'history',
|
||||
// 'history',
|
||||
'activities',
|
||||
// 'payments',
|
||||
// 'client',
|
||||
|
@ -34,7 +34,7 @@ class RecurringInvoiceTransformer extends EntityTransformer
|
||||
'invitations',
|
||||
'documents',
|
||||
'activities',
|
||||
'history',
|
||||
// 'history',
|
||||
// 'client',
|
||||
];
|
||||
|
||||
|
@ -190,7 +190,7 @@ class HtmlEngine
|
||||
}
|
||||
else{
|
||||
$data['$balance_due'] = ['value' => Number::formatMoney($this->entity->balance, $this->client) ?: ' ', 'label' => ctrans('texts.balance_due')];
|
||||
$data['$balance_due_raw'] = ['value' => $this->entity->balance, 'label' => ctrans('texts.balance_due')];
|
||||
$data['$balance_due_raw'] = ['value' => $this->entity->balance, 'label' => ctrans('texts.balance_due')];
|
||||
}
|
||||
}
|
||||
|
||||
@ -302,7 +302,7 @@ class HtmlEngine
|
||||
|
||||
$data['$contact.full_name'] = ['value' => $this->contact->present()->name(), 'label' => ctrans('texts.name')];
|
||||
$data['$contact'] = &$data['$contact.full_name'];
|
||||
|
||||
|
||||
$data['$contact.email'] = ['value' => $this->contact->email, 'label' => ctrans('texts.email')];
|
||||
$data['$contact.phone'] = ['value' => $this->contact->phone, 'label' => ctrans('texts.phone')];
|
||||
|
||||
@ -439,6 +439,9 @@ class HtmlEngine
|
||||
$data['$dir'] = ['value' => optional($this->client->language())->locale === 'ar' ? 'rtl' : 'ltr', 'label' => ''];
|
||||
$data['$dir_text_align'] = ['value' => optional($this->client->language())->locale === 'ar' ? 'right' : 'left', 'label' => ''];
|
||||
|
||||
$data['$payment.date'] = ['value' => ' ', 'label' => ctrans('texts.payment_date')];
|
||||
$data['$method'] = ['value' => ' ', 'label' => ctrans('texts.method')];
|
||||
|
||||
$arrKeysLength = array_map('strlen', array_keys($data));
|
||||
array_multisort($arrKeysLength, SORT_DESC, $data);
|
||||
|
||||
|
@ -207,6 +207,7 @@ return [
|
||||
['options' => [
|
||||
'replication' => 'sentinel',
|
||||
'service' => env('REDIS_SENTINEL_SERVICE', 'mymaster'),
|
||||
'sentinel_timeout' => 1.0,
|
||||
'parameters' => [
|
||||
'password' => env('REDIS_PASSWORD', null),
|
||||
'database' => env('REDIS_DB', 0),
|
||||
@ -225,6 +226,7 @@ return [
|
||||
['options' => [
|
||||
'replication' => 'sentinel',
|
||||
'service' => env('REDIS_SENTINEL_SERVICE', 'mymaster'),
|
||||
'sentinel_timeout' => 1.0,
|
||||
'parameters' => [
|
||||
'password' => env('REDIS_PASSWORD', null),
|
||||
'database' => env('REDIS_CACHE_DB', 1),
|
||||
|
@ -14,8 +14,8 @@ return [
|
||||
'require_https' => env('REQUIRE_HTTPS', true),
|
||||
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
||||
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
|
||||
'app_version' => '5.3.0',
|
||||
'app_tag' => '5.3.0',
|
||||
'app_version' => '5.3.1',
|
||||
'app_tag' => '5.3.1',
|
||||
'minimum_client_version' => '5.0.16',
|
||||
'terms_version' => '1.0.1',
|
||||
'api_secret' => env('API_SECRET', ''),
|
||||
|
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class ReportIncludeDraftsInCompaniesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('companies', function (Blueprint $table) {
|
||||
$table->boolean('report_include_drafts')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@ -2053,6 +2053,214 @@ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
--------------------------------------------------------------------------------
|
||||
ansicolor
|
||||
charts_common
|
||||
charts_flutter
|
||||
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
archive
|
||||
|
||||
@ -5299,213 +5507,6 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
charts_common
|
||||
charts_flutter
|
||||
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
clock
|
||||
coverage
|
||||
@ -7229,6 +7230,7 @@ SOFTWARE.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
flutter_styled_toast
|
||||
injector
|
||||
webdriver
|
||||
|
||||
Apache License
|
||||
@ -13869,6 +13871,31 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
msix
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 Yehuda Kremer
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
native_pdf_renderer
|
||||
|
||||
|
6
public/flutter_service_worker.js
vendored
6
public/flutter_service_worker.js
vendored
@ -26,15 +26,15 @@ const RESOURCES = {
|
||||
"assets/FontManifest.json": "cf3c681641169319e61b61bd0277378f",
|
||||
"assets/fonts/MaterialIcons-Regular.otf": "4e6447691c9509f7acdbf8a931a85ca1",
|
||||
"assets/packages/material_design_icons_flutter/lib/fonts/materialdesignicons-webfont.ttf": "174c02fc4609e8fc4389f5d21f16a296",
|
||||
"assets/NOTICES": "4d4db4724f228190d45706dc2890bfff",
|
||||
"assets/NOTICES": "cd6dfc37608a8f2f6be693260e1c1435",
|
||||
"icons/Icon-192.png": "bb1cf5f6982006952211c7c8404ffbed",
|
||||
"icons/Icon-512.png": "0f9aff01367f0a0c69773d25ca16ef35",
|
||||
"favicon.png": "dca91c54388f52eded692718d5a98b8b",
|
||||
"manifest.json": "ef43d90e57aa7682d7e2cfba2f484a40",
|
||||
"version.json": "46d4015fc9abcefe5371cafcf2084173",
|
||||
"favicon.ico": "51636d3a390451561744c42188ccd628",
|
||||
"main.dart.js": "88f74d039d64ab36ff800c42ba1d83c4",
|
||||
"/": "bafb7d5b8d7dac602c955954c6dd27ae"
|
||||
"main.dart.js": "6c0d755c0f7fe5211d33ac59d499dafe",
|
||||
"/": "76a5fa48cfed240c8326ae7736d8044d"
|
||||
};
|
||||
|
||||
// The application shell files that are downloaded before a service worker can
|
||||
|
122269
public/main.dart.js
vendored
122269
public/main.dart.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
148409
public/main.foss.dart.js
vendored
148409
public/main.foss.dart.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
132371
public/main.last.dart.js
vendored
132371
public/main.last.dart.js
vendored
File diff suppressed because one or more lines are too long
130421
public/main.next.dart.js
vendored
130421
public/main.next.dart.js
vendored
File diff suppressed because one or more lines are too long
125545
public/main.wasm.dart.js
vendored
125545
public/main.wasm.dart.js
vendored
File diff suppressed because one or more lines are too long
@ -80,9 +80,7 @@
|
||||
padding-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
#product-table,
|
||||
#task-table,
|
||||
#delivery-note-table {
|
||||
[data-ref="table"] {
|
||||
min-width: 100%;
|
||||
table-layout: fixed;
|
||||
overflow-wrap: break-word;
|
||||
@ -96,46 +94,32 @@
|
||||
color: grey;
|
||||
}
|
||||
|
||||
#product-table > thead,
|
||||
#delivery-note-table > thead,
|
||||
#task-table > thead {
|
||||
[data-ref="table"] > thead {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#product-table > thead > tr > th,
|
||||
#delivery-note-table > thead > tr > th,
|
||||
#task-table > thead > tr > th {
|
||||
[data-ref="table"] > thead > tr > th {
|
||||
padding: 1.5rem 3rem;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
#product-table > thead > tr > th:last-child,
|
||||
#delivery-note-table > thead > tr > th:last-child,
|
||||
#task-table > thead > tr > th:last-child {
|
||||
[data-ref="table"] > thead > tr > th:last-child {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#product-table > tbody > tr > td,
|
||||
#delivery-note-table > tbody > tr > td,
|
||||
#task-table > tbody > tr > td {
|
||||
[data-ref="table"] > tbody > tr > td {
|
||||
padding: 1.5rem 3rem;
|
||||
}
|
||||
|
||||
#product-table > tbody > tr > td:last-child,
|
||||
#delivery-note-table > tbody > tr > td:last-child,
|
||||
#task-table > tbody > tr > td:last-child {
|
||||
[data-ref="table"] > tbody > tr > td:last-child {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#product-table > tbody > tr > td:first-child,
|
||||
#delivery-note-table > tbody > tr > td:first-child,
|
||||
#task-table > tbody > tr > td:first-child {
|
||||
[data-ref="table"] > tbody > tr > td:first-child {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#product-table > tbody > tr:nth-child(odd),
|
||||
#delivery-note-table > tbody > tr:nth-child(odd),
|
||||
#task-table > tbody > tr:nth-child(odd) {
|
||||
[data-ref="table"] > tbody > tr:nth-child(odd) {
|
||||
background-color: #ebebeb;
|
||||
}
|
||||
|
||||
@ -254,12 +238,18 @@
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
[data-ref="product_table-product.description-th"] {
|
||||
[data-ref="product_table-product.description-th"] {
|
||||
width: 23%;
|
||||
}
|
||||
|
||||
[data-ref="statement-totals"] {
|
||||
margin-top: 1rem;
|
||||
text-align: right;
|
||||
margin-right: .75rem;
|
||||
}
|
||||
|
||||
/** Useful snippets, uncomment to enable. **/
|
||||
|
||||
|
||||
/** Hide company logo **/
|
||||
/* .company-logo { display: none } */
|
||||
|
||||
@ -318,11 +308,20 @@
|
||||
</div>
|
||||
|
||||
<!-- Start Print Content -->
|
||||
<table id="product-table" cellspacing="0" class="print-content"></table>
|
||||
<table id="product-table" cellspacing="0" class="print-content" data-ref="table"></table>
|
||||
|
||||
<table id="task-table" cellspacing="0" class="print-content"></table>
|
||||
<table id="task-table" cellspacing="0" class="print-content" data-ref="table"></table>
|
||||
|
||||
<table id="delivery-note-table" cellspacing="0" class="print-content"></table>
|
||||
<table id="delivery-note-table" cellspacing="0" class="print-content" data-ref="table"></table>
|
||||
|
||||
<table id="statement-invoice-table" cellspacing="0" class="print-content" data-ref="table"></table>
|
||||
<div id="statement-invoice-table-totals" data-ref="statement-totals"></div>
|
||||
|
||||
<table id="statement-payment-table" cellspacing="0" class="print-content" data-ref="table"></table>
|
||||
<div id="statement-payment-table-totals" data-ref="statement-totals"></div>
|
||||
|
||||
<table id="statement-aging-table" cellspacing="0" class="print-content" data-ref="table"></table>
|
||||
<div id="statement-aging-table-totals" data-ref="statement-totals"></div>
|
||||
<!-- End Print Content -->
|
||||
</td>
|
||||
</tr>
|
||||
@ -350,7 +349,12 @@
|
||||
<script>
|
||||
// Clear up space a bit, if [product-table, tasks-table, delivery-note-table] isn't present.
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
['product-table', 'task-table', 'delivery-note-table'].forEach((tableIdentifier) => {
|
||||
let tables = [
|
||||
'product-table', 'task-table', 'delivery-note-table',
|
||||
'statement-invoice-table', 'statement-payment-table', 'statement-aging-table-totals',
|
||||
];
|
||||
|
||||
tables.forEach((tableIdentifier) => {
|
||||
document.getElementById(tableIdentifier).childElementCount === 0
|
||||
? document.getElementById(tableIdentifier).style.display = 'none'
|
||||
: '';
|
||||
|
@ -32,7 +32,7 @@
|
||||
.company-logo {
|
||||
max-width: 65%;
|
||||
}
|
||||
|
||||
|
||||
.header-container > span {
|
||||
display: block;
|
||||
}
|
||||
@ -93,9 +93,7 @@
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#product-table,
|
||||
#delivery-note-table,
|
||||
#task-table {
|
||||
[data-ref="table"] {
|
||||
margin-top: 3.5rem;
|
||||
/* margin-bottom: 200px; */
|
||||
min-width: 100%;
|
||||
@ -109,55 +107,39 @@
|
||||
color: grey;
|
||||
}
|
||||
|
||||
#product-table > thead,
|
||||
#delivery-note-table > thead,
|
||||
#task-table > thead {
|
||||
[data-ref="table"] > thead {
|
||||
text-align: left;
|
||||
background: var(--secondary-color);
|
||||
}
|
||||
|
||||
#product-table > thead > tr > th,
|
||||
#delivery-note-table > thead > tr > th,
|
||||
#task-table > thead > tr > th {
|
||||
[data-ref="table"] > thead > tr > th {
|
||||
padding: 1rem;
|
||||
color: white;
|
||||
font-weight: semibold;
|
||||
}
|
||||
|
||||
#product-table > thead > tr > th:first-child,
|
||||
#delivery-note-table > thead > tr > th:first-child,
|
||||
#task-table > thead > tr > th:first-child {
|
||||
[data-ref="table"] > thead > tr > th:first-child {
|
||||
border-top-left-radius: 1rem;
|
||||
}
|
||||
|
||||
#product-table > thead > tr > th:last-child,
|
||||
#delivery-note-table > thead > tr > th:last-child,
|
||||
#task-table > thead > tr > th:last-child {
|
||||
[data-ref="table"] > thead > tr > th:last-child {
|
||||
border-top-right-radius: 1rem;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#product-table > tbody > tr > td,
|
||||
#delivery-note-table > tbody > tr > td,
|
||||
#task-table > tbody > tr > td {
|
||||
[data-ref="table"] > tbody > tr > td {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
#product-table > tbody > tr > td:last-child,
|
||||
#delivery-note-table > tbody > tr > td:last-child,
|
||||
#task-table > tbody > tr > td:last-child {
|
||||
[data-ref="table"] > tbody > tr > td:last-child {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#product-table > tbody > tr:nth-child(odd) > td,
|
||||
#delivery-note-table > tbody > tr:nth-child(odd) > td,
|
||||
#task-table > tbody > tr:nth-child(odd) > td {
|
||||
[data-ref="table"] > tbody > tr:nth-child(odd) > td {
|
||||
background: #F7F7F7;
|
||||
}
|
||||
|
||||
#product-table > tbody > tr:nth-child(even) > td,
|
||||
#delivery-note-table > tbody > tr:nth-child(even) > td,
|
||||
#task-table > tbody > tr:nth-child(even) > td {
|
||||
[data-ref="table"] > tbody > tr:nth-child(even) > td {
|
||||
background: #f7f7f7;
|
||||
}
|
||||
|
||||
@ -241,9 +223,7 @@
|
||||
}
|
||||
|
||||
/** Markdown-specific styles. **/
|
||||
#product-table h3,
|
||||
#task-table h3,
|
||||
#delivery-note-table h3 {
|
||||
[data-ref="table"] h3 {
|
||||
font-size: 1rem;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
@ -257,8 +237,14 @@
|
||||
padding-right: 7px;
|
||||
}
|
||||
|
||||
[data-ref="statement-totals"] {
|
||||
margin-top: 1rem;
|
||||
text-align: right;
|
||||
margin-right: .75rem;
|
||||
}
|
||||
|
||||
/** Useful snippets, uncomment to enable. **/
|
||||
|
||||
|
||||
/** Hide company logo **/
|
||||
/* .company-logo { display: none } */
|
||||
|
||||
@ -310,12 +296,21 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="product-table" cellspacing="0"></table>
|
||||
<table id="product-table" cellspacing="0" data-ref="table"></table>
|
||||
|
||||
<table id="task-table" cellspacing="0"></table>
|
||||
<table id="task-table" cellspacing="0" data-ref="table"></table>
|
||||
|
||||
<table id="delivery-note-table" cellspacing="0" data-ref="table"></table>
|
||||
|
||||
<table id="statement-invoice-table" cellspacing="0" data-ref="table"></table>
|
||||
<div id="statement-invoice-table-totals" data-ref="statement-totals"></div>
|
||||
|
||||
<table id="statement-payment-table" cellspacing="0" data-ref="table"></table>
|
||||
<div id="statement-payment-table-totals" data-ref="statement-totals"></div>
|
||||
|
||||
<table id="statement-aging-table" cellspacing="0" data-ref="table"></table>
|
||||
<div id="statement-aging-table-totals" data-ref="statement-totals"></div>
|
||||
|
||||
<table id="delivery-note-table" cellspacing="0"></table>
|
||||
|
||||
<div id="table-totals" cellspacing="0"></div>
|
||||
</div>
|
||||
|
||||
@ -325,7 +320,12 @@
|
||||
<script>
|
||||
// Clear up space a bit, if [product-table, tasks-table, delivery-note-table] isn't present.
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
['product-table', 'task-table', 'delivery-note-table'].forEach((tableIdentifier) => {
|
||||
let tables = [
|
||||
'product-table', 'task-table', 'delivery-note-table',
|
||||
'statement-invoice-table', 'statement-payment-table', 'statement-aging-table-totals',
|
||||
];
|
||||
|
||||
tables.forEach((tableIdentifier) => {
|
||||
document.getElementById(tableIdentifier).childElementCount === 0
|
||||
? document.getElementById(tableIdentifier).style.display = 'none'
|
||||
: '';
|
||||
|
@ -88,9 +88,7 @@
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#product-table,
|
||||
#delivery-note-table,
|
||||
#task-table {
|
||||
[data-ref="table"] {
|
||||
margin-top: 3rem;
|
||||
/* margin-bottom: 200px; */
|
||||
min-width: 100%;
|
||||
@ -104,43 +102,31 @@
|
||||
color: grey;
|
||||
}
|
||||
|
||||
#product-table > thead,
|
||||
#delivery-note-table > thead,
|
||||
#task-table > thead {
|
||||
[data-ref="table"] > thead {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#product-table > thead > tr > th,
|
||||
#delivery-note-table > thead > tr > th,
|
||||
#task-table > thead > tr > th {
|
||||
[data-ref="table"] > thead > tr > th {
|
||||
font-size: 1.1rem;
|
||||
padding-bottom: 1.5rem;
|
||||
padding-left: 1rem;
|
||||
}
|
||||
|
||||
#product-table > tbody > tr > td,
|
||||
#delivery-note-table > tbody > tr > td,
|
||||
#task-table > tbody > tr > td {
|
||||
[data-ref="table"] > tbody > tr > td {
|
||||
border-top: 1px solid #d8d8d8;
|
||||
border-bottom: 1px solid #d8d8d8;
|
||||
padding: 1.5rem;
|
||||
}
|
||||
|
||||
#product-table > tbody > tr > td:first-child,
|
||||
#delivery-note-table > tbody > tr > td:first-child,
|
||||
#task-table > tbody > tr > td:first-child {
|
||||
[data-ref="table"] > tbody > tr > td:first-child {
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
#product-table > tbody > tr > td:last-child,
|
||||
#delivery-note-table > tbody > tr > td:last-child,
|
||||
#task-table > tbody > tr > td:last-child {
|
||||
[data-ref="table"] > tbody > tr > td:last-child {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#product-table > tbody > tr:nth-child(odd),
|
||||
#delivery-note-table > tbody > tr:nth-child(odd),
|
||||
#task-table > tbody > tr:nth-child(odd) {
|
||||
[data-ref="table"] > tbody > tr:nth-child(odd) {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
@ -214,9 +200,15 @@
|
||||
flex-direction: column;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
|
||||
[data-ref="statement-totals"] {
|
||||
margin-top: 1rem;
|
||||
text-align: right;
|
||||
margin-right: .75rem;
|
||||
}
|
||||
|
||||
/** Useful snippets, uncomment to enable. **/
|
||||
|
||||
|
||||
/** Hide company logo **/
|
||||
/* .company-logo { display: none } */
|
||||
|
||||
@ -266,22 +258,36 @@
|
||||
<div id="client-details"></div>
|
||||
</div>
|
||||
|
||||
<table id="product-table" cellspacing="0"></table>
|
||||
<table id="product-table" cellspacing="0" data-ref="table"></table>
|
||||
|
||||
<table id="task-table" cellspacing="0"></table>
|
||||
<table id="task-table" cellspacing="0" data-ref="table"></table>
|
||||
|
||||
<table id="delivery-note-table" cellspacing="0"></table>
|
||||
<table id="delivery-note-table" cellspacing="0" data-ref="table"></table>
|
||||
|
||||
<table id="statement-invoice-table" cellspacing="0" data-ref="table"></table>
|
||||
<div id="statement-invoice-table-totals" data-ref="statement-totals"></div>
|
||||
|
||||
<table id="statement-payment-table" cellspacing="0" data-ref="table"></table>
|
||||
<div id="statement-payment-table-totals" data-ref="statement-totals"></div>
|
||||
|
||||
<table id="statement-aging-table" cellspacing="0" data-ref="table"></table>
|
||||
<div id="statement-aging-table-totals" data-ref="statement-totals"></div>
|
||||
|
||||
<div id="table-totals" cellspacing="0"></div>
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
<p data-ref="total_table-footer">$entity_footer</p>
|
||||
|
||||
|
||||
<script>
|
||||
// Clear up space a bit, if [product-table, tasks-table, delivery-note-table] isn't present.
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
['product-table', 'task-table', 'delivery-note-table'].forEach((tableIdentifier) => {
|
||||
let tables = [
|
||||
'product-table', 'task-table', 'delivery-note-table',
|
||||
'statement-invoice-table', 'statement-payment-table', 'statement-aging-table-totals',
|
||||
];
|
||||
|
||||
tables.forEach((tableIdentifier) => {
|
||||
document.getElementById(tableIdentifier).childElementCount === 0
|
||||
? document.getElementById(tableIdentifier).style.display = 'none'
|
||||
: '';
|
||||
|
@ -84,18 +84,14 @@
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
#product-table,
|
||||
#delivery-note-table,
|
||||
#task-table {
|
||||
[data-ref="table"] {
|
||||
/* margin-bottom: 200px; */
|
||||
min-width: 100%;
|
||||
table-layout: fixed;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
#product-table:not(:empty),
|
||||
#delivery-note-table:not(:empty),
|
||||
#task-table:not(:empty) {
|
||||
[data-ref="table"]:not(:empty) {
|
||||
border-top: 5px solid var(--primary-color);
|
||||
margin-top: 3rem;
|
||||
}
|
||||
@ -106,40 +102,28 @@
|
||||
color: grey;
|
||||
}
|
||||
|
||||
#product-table > thead,
|
||||
#delivery-note-table > thead,
|
||||
#task-table > thead {
|
||||
[data-ref="table"] > thead {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#product-table > thead > tr > th,
|
||||
#delivery-note-table > thead > tr > th,
|
||||
#task-table > thead > tr > th {
|
||||
[data-ref="table"] > thead > tr > th {
|
||||
font-size: 1.1rem;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
#product-table > thead > tr > th:last-child,
|
||||
#delivery-note-table > thead > tr > th:last-child,
|
||||
#task-table > thead > tr > th:last-child {
|
||||
[data-ref="table"] > thead > tr > th:last-child {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#product-table > tbody > tr > td:last-child,
|
||||
#delivery-note-table > tbody > tr > td:last-child,
|
||||
#task-table > tbody > tr > td:last-child {
|
||||
[data-ref="table"] > tbody > tr > td:last-child {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#product-table > tbody > tr > td,
|
||||
#delivery-note-table > tbody > tr > td,
|
||||
#task-table > tbody > tr > td {
|
||||
[data-ref="table"] > tbody > tr > td {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
#product-table > tbody > tr:nth-child(odd),
|
||||
#delivery-note-table > tbody > tr:nth-child(odd),
|
||||
#task-table > tbody > tr:nth-child(odd) {
|
||||
[data-ref="table"] > tbody > tr:nth-child(odd) {
|
||||
background-color: #e8e8e8;
|
||||
}
|
||||
|
||||
@ -171,7 +155,7 @@
|
||||
margin-top: calc(.75rem * calc(1 - var(--tw-space-y-reverse)));
|
||||
margin-bottom: calc(.75rem * var(--tw-space-y-reverse));
|
||||
}
|
||||
|
||||
|
||||
#table-totals>.totals-table-right-side>*> :nth-child(2) {
|
||||
text-align: right;
|
||||
}
|
||||
@ -201,15 +185,19 @@
|
||||
}
|
||||
|
||||
/** Markdown-specific styles. **/
|
||||
#product-table h3,
|
||||
#task-table h3,
|
||||
#delivery-note-table h3 {
|
||||
[data-ref="table"] h3 {
|
||||
font-size: 1rem;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
|
||||
[data-ref="statement-totals"] {
|
||||
margin-top: 1rem;
|
||||
text-align: right;
|
||||
margin-right: .75rem;
|
||||
}
|
||||
|
||||
/** Useful snippets, uncomment to enable. **/
|
||||
|
||||
|
||||
/** Hide company logo **/
|
||||
/* .company-logo { display: none } */
|
||||
|
||||
@ -266,12 +254,21 @@
|
||||
<table id="entity-details" cellspacing="0" dir="$dir"></table>
|
||||
</div>
|
||||
|
||||
<table id="product-table" cellspacing="0"></table>
|
||||
<table id="product-table" cellspacing="0" data-ref="table"></table>
|
||||
|
||||
<table id="task-table" cellspacing="0"></table>
|
||||
<table id="task-table" cellspacing="0" data-ref="table"></table>
|
||||
|
||||
<table id="delivery-note-table" cellspacing="0" data-ref="table"></table>
|
||||
|
||||
<table id="statement-invoice-table" cellspacing="0" data-ref="table"></table>
|
||||
<div id="statement-invoice-table-totals" data-ref="statement-totals"></div>
|
||||
|
||||
<table id="statement-payment-table" cellspacing="0" data-ref="table"></table>
|
||||
<div id="statement-payment-table-totals" data-ref="statement-totals"></div>
|
||||
|
||||
<table id="statement-aging-table" cellspacing="0" data-ref="table"></table>
|
||||
<div id="statement-aging-table-totals" data-ref="statement-totals"></div>
|
||||
|
||||
<table id="delivery-note-table" cellspacing="0"></table>
|
||||
|
||||
<div id="table-totals" cellspacing="0"></div>
|
||||
</div>
|
||||
|
||||
@ -281,7 +278,12 @@
|
||||
<script>
|
||||
// Clear up space a bit, if [product-table, tasks-table, delivery-note-table] isn't present.
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
['product-table', 'task-table', 'delivery-note-table'].forEach((tableIdentifier) => {
|
||||
let tables = [
|
||||
'product-table', 'task-table', 'delivery-note-table',
|
||||
'statement-invoice-table', 'statement-payment-table', 'statement-aging-table-totals',
|
||||
];
|
||||
|
||||
tables.forEach((tableIdentifier) => {
|
||||
document.getElementById(tableIdentifier).childElementCount === 0
|
||||
? document.getElementById(tableIdentifier).style.display = 'none'
|
||||
: '';
|
||||
|
@ -86,9 +86,7 @@
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
#product-table,
|
||||
#delivery-note-table,
|
||||
#task-table {
|
||||
[data-ref="table"] {
|
||||
margin-top: 3rem;
|
||||
/* margin-bottom: 200px; */
|
||||
min-width: 100%;
|
||||
@ -102,15 +100,11 @@
|
||||
color: grey;
|
||||
}
|
||||
|
||||
#product-table > thead,
|
||||
#delivery-note-table > thead,
|
||||
#task-table > thead {
|
||||
[data-ref="table"] > thead {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#product-table > thead > tr > th,
|
||||
#delivery-note-table > thead > tr > th,
|
||||
#task-table > thead > tr > th {
|
||||
[data-ref="table"] > thead > tr > th {
|
||||
font-size: 1.1rem;
|
||||
padding-bottom: 1.5rem;
|
||||
padding-left: 1rem;
|
||||
@ -118,30 +112,21 @@
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#product-table > thead > tr > th:last-child,
|
||||
#delivery-note-table > thead > tr > th:last-child,
|
||||
#task-table > thead > tr > th:last-child {
|
||||
[data-ref="table"] > thead > tr > th:last-child {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#product-table > tbody > tr > td,
|
||||
#delivery-note-table > tbody > tr > td,
|
||||
#task-table > tbody > tr > td {
|
||||
[data-ref="table"] > tbody > tr > td {
|
||||
border-bottom: 1pt solid;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
#product-table > tbody > tr:first-child > td,
|
||||
#delivery-note-table > tbody > tr:first-child > td,
|
||||
#task-table > tbody > tr:first-child > td {
|
||||
[data-ref="table"] > tbody > tr:first-child > td {
|
||||
border-top: 1pt solid !important;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
|
||||
#product-table > tbody > tr > td:last-child,
|
||||
#delivery-note-table > tbody > tr > td:last-child,
|
||||
#task-table > tbody > tr > td:last-child {
|
||||
[data-ref="table"] > tbody > tr > td:last-child {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
@ -206,17 +191,21 @@
|
||||
#footer {
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
|
||||
/** Markdown-specific styles. **/
|
||||
#product-table h3,
|
||||
#task-table h3,
|
||||
#delivery-note-table h3 {
|
||||
[data-ref="table"] h3 {
|
||||
font-size: 1rem;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
[data-ref="statement-totals"] {
|
||||
margin-top: 1rem;
|
||||
text-align: right;
|
||||
margin-right: .75rem;
|
||||
}
|
||||
|
||||
/** Useful snippets, uncomment to enable. **/
|
||||
|
||||
|
||||
/** Hide company logo **/
|
||||
/* .company-logo { display: none } */
|
||||
|
||||
@ -275,12 +264,21 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="product-table" cellspacing="0"></table>
|
||||
<table id="product-table" cellspacing="0" data-ref="table"></table>
|
||||
|
||||
<table id="task-table" cellspacing="0"></table>
|
||||
<table id="task-table" cellspacing="0" data-ref="table"></table>
|
||||
|
||||
<table id="delivery-note-table" cellspacing="0" data-ref="table"></table>
|
||||
|
||||
<table id="statement-invoice-table" cellspacing="0" data-ref="table"></table>
|
||||
<div id="statement-invoice-table-totals" data-ref="statement-totals"></div>
|
||||
|
||||
<table id="statement-payment-table" cellspacing="0" data-ref="table"></table>
|
||||
<div id="statement-payment-table-totals" data-ref="statement-totals"></div>
|
||||
|
||||
<table id="statement-aging-table" cellspacing="0" data-ref="table"></table>
|
||||
<div id="statement-aging-table-totals" data-ref="statement-totals"></div>
|
||||
|
||||
<table id="delivery-note-table" cellspacing="0"></table>
|
||||
|
||||
<div id="table-totals" cellspacing="0"></div>
|
||||
</div>
|
||||
|
||||
@ -290,7 +288,12 @@
|
||||
<script>
|
||||
// Clear up space a bit, if [product-table, tasks-table, delivery-note-table] isn't present.
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
['product-table', 'task-table', 'delivery-note-table'].forEach((tableIdentifier) => {
|
||||
let tables = [
|
||||
'product-table', 'task-table', 'delivery-note-table',
|
||||
'statement-invoice-table', 'statement-payment-table', 'statement-aging-table-totals',
|
||||
];
|
||||
|
||||
tables.forEach((tableIdentifier) => {
|
||||
document.getElementById(tableIdentifier).childElementCount === 0
|
||||
? document.getElementById(tableIdentifier).style.display = 'none'
|
||||
: '';
|
||||
|
@ -98,9 +98,7 @@
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#product-table,
|
||||
#delivery-note-table,
|
||||
#task-table {
|
||||
[data-ref="table"] {
|
||||
margin-top: 3rem;
|
||||
/* margin-bottom: 200px; */
|
||||
min-width: 100%;
|
||||
@ -114,39 +112,29 @@
|
||||
color: grey;
|
||||
}
|
||||
|
||||
#product-table > thead,
|
||||
#product-table > thead,
|
||||
#task-table > thead {
|
||||
[data-ref="table"] > thead {
|
||||
text-align: left;
|
||||
text-transform: uppercase;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#product-table > thead > tr > th,
|
||||
#delivery-note-table > thead > tr > th,
|
||||
#task-table > thead > tr > th {
|
||||
[data-ref="table"] > thead > tr > th {
|
||||
font-size: 1.1rem;
|
||||
padding-bottom: 1.5rem;
|
||||
padding-left: 1rem;
|
||||
border-left: 1px solid;
|
||||
}
|
||||
|
||||
#product-table > thead > tr > th:last-child,
|
||||
#delivery-note-table > thead > tr > th:last-child,
|
||||
#task-table > thead > tr > th:last-child {
|
||||
[data-ref="table"] > thead > tr > th:last-child {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#product-table > tbody > tr > td,
|
||||
#delivery-note-table > tbody > tr > td,
|
||||
#task-table > tbody > tr > td {
|
||||
[data-ref="table"] > tbody > tr > td {
|
||||
padding: 1rem;
|
||||
border-left: 1px solid;
|
||||
}
|
||||
|
||||
#product-table > tbody > tr td:last-child,
|
||||
#delivery-note-table > tbody > tr td:last-child,
|
||||
#task-table > tbody > tr td:last-child {
|
||||
[data-ref="table"] > tbody > tr td:last-child {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
@ -208,9 +196,7 @@
|
||||
}
|
||||
|
||||
/** Markdown-specific styles. **/
|
||||
#product-table h3,
|
||||
#task-table h3,
|
||||
#delivery-note-table h3 {
|
||||
[data-ref="table"] h3 {
|
||||
font-size: 1rem;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
@ -229,8 +215,14 @@
|
||||
|
||||
[data-ref="totals_table-outstanding"] { color: var(--primary-color); }
|
||||
|
||||
[data-ref="statement-totals"] {
|
||||
margin-top: 1rem;
|
||||
text-align: right;
|
||||
margin-right: .75rem;
|
||||
}
|
||||
|
||||
/** Useful snippets, uncomment to enable. **/
|
||||
|
||||
|
||||
/** Hide company logo **/
|
||||
/* .company-logo { display: none } */
|
||||
|
||||
@ -294,17 +286,17 @@
|
||||
</span>
|
||||
<span class="entity-property-value">$entity_number</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
<span class="entity-property-label">$date_label:</span>
|
||||
<span class="entity-property-value">$date</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
<span class="entity-property-label">$payment_due_label:</span>
|
||||
<span class="entity-property-value">$payment_due</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
<span class="entity-property-label">$amount_due_label:</span>
|
||||
<span
|
||||
@ -315,11 +307,20 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="product-table" cellspacing="0"></table>
|
||||
<table id="product-table" cellspacing="0" data-ref="table"></table>
|
||||
|
||||
<table id="task-table" cellspacing="0"></table>
|
||||
<table id="task-table" cellspacing="0" data-ref="table"></table>
|
||||
|
||||
<table id="delivery-note-table" cellspacing="0"></table>
|
||||
<table id="delivery-note-table" cellspacing="0" data-ref="table"></table>
|
||||
|
||||
<table id="statement-invoice-table" cellspacing="0" data-ref="table"></table>
|
||||
<div id="statement-invoice-table-totals" data-ref="statement-totals"></div>
|
||||
|
||||
<table id="statement-payment-table" cellspacing="0" data-ref="table"></table>
|
||||
<div id="statement-payment-table-totals" data-ref="statement-totals"></div>
|
||||
|
||||
<table id="statement-aging-table" cellspacing="0" data-ref="table"></table>
|
||||
<div id="statement-aging-table-totals" data-ref="statement-totals"></div>
|
||||
|
||||
<div id="table-totals" cellspacing="0"></div>
|
||||
</div>
|
||||
@ -330,7 +331,12 @@
|
||||
<script>
|
||||
// Clear up space a bit, if [product-table, tasks-table, delivery-note-table] isn't present.
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
['product-table', 'task-table', 'delivery-note-table'].forEach((tableIdentifier) => {
|
||||
let tables = [
|
||||
'product-table', 'task-table', 'delivery-note-table',
|
||||
'statement-invoice-table', 'statement-payment-table', 'statement-aging-table-totals',
|
||||
];
|
||||
|
||||
tables.forEach((tableIdentifier) => {
|
||||
document.getElementById(tableIdentifier).childElementCount === 0
|
||||
? document.getElementById(tableIdentifier).style.display = 'none'
|
||||
: '';
|
||||
|
@ -77,9 +77,7 @@
|
||||
margin: 3rem 2rem;
|
||||
}
|
||||
|
||||
#product-table,
|
||||
#delivery-note-table,
|
||||
#task-table {
|
||||
[data-ref="table"] {
|
||||
min-width: 100%;
|
||||
table-layout: fixed;
|
||||
overflow-wrap: break-word;
|
||||
@ -91,49 +89,35 @@
|
||||
color: grey;
|
||||
}
|
||||
|
||||
#product-table > thead,
|
||||
#delivery-note-table > thead,
|
||||
#task-table > thead {
|
||||
[data-ref="table"] > thead {
|
||||
text-align: left;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#product-table th + th,
|
||||
#delivery-note-table th + th,
|
||||
#task-table th + th {
|
||||
[data-ref="table"] th + th {
|
||||
border-left: 2px solid white;
|
||||
}
|
||||
|
||||
#product-table > thead > tr > th,
|
||||
#delivery-note-table > thead > tr > th,
|
||||
#task-table > thead > tr > th {
|
||||
[data-ref="table"] > thead > tr > th {
|
||||
padding: 0.8rem;
|
||||
background-color: var(--secondary-color);
|
||||
color: white;
|
||||
}
|
||||
|
||||
#product-table > thead > tr > th:last-child,
|
||||
#delivery-note-table > thead > tr > th:last-child,
|
||||
#task-table > thead > tr > th:last-child {
|
||||
[data-ref="table"] > thead > tr > th:last-child {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#product-table > tbody > tr > td,
|
||||
#delivery-note-table > tbody > tr > td,
|
||||
#task-table > tbody > tr > td {
|
||||
[data-ref="table"] > tbody > tr > td {
|
||||
border-bottom: 1px solid var(--secondary-color);
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
#product-table > tbody > tr > td:first-child,
|
||||
#delivery-note-table > tbody > tr > td:first-child,
|
||||
#task-table > tbody > tr > td:first-child {
|
||||
[data-ref="table"] > tbody > tr > td:first-child {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#product-table > tbody > tr > td:last-child,
|
||||
#delivery-note-table > tbody > tr > td:last-child,
|
||||
#task-table > tbody > tr > td:last-child {
|
||||
[data-ref="table"] > tbody > tr > td:last-child {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
@ -282,6 +266,13 @@
|
||||
width: 23%;
|
||||
}
|
||||
|
||||
[data-ref="statement-totals"] {
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
text-align: right;
|
||||
margin-right: .75rem;
|
||||
}
|
||||
|
||||
/** Useful snippets, uncomment to enable. **/
|
||||
|
||||
/** Hide company logo **/
|
||||
@ -339,9 +330,20 @@
|
||||
|
||||
<!-- Start Print Content -->
|
||||
<div class="table-wrapper">
|
||||
<table id="product-table" cellspacing="0" class="print-content"></table>
|
||||
<table id="task-table" cellspacing="0" class="print-content"></table>
|
||||
<table id="delivery-note-table" cellspacing="0" class="print-content"></table>
|
||||
<table id="product-table" cellspacing="0" class="print-content" data-ref="table"></table>
|
||||
|
||||
<table id="task-table" cellspacing="0" class="print-content" data-ref="table"></table>
|
||||
|
||||
<table id="delivery-note-table" cellspacing="0" class="print-content" data-ref="table"></table>
|
||||
|
||||
<table id="statement-invoice-table" cellspacing="0" class="print-content" data-ref="table"></table>
|
||||
<div id="statement-invoice-table-totals" data-ref="statement-totals"></div>
|
||||
|
||||
<table id="statement-payment-table" cellspacing="0" class="print-content" data-ref="table"></table>
|
||||
<div id="statement-payment-table-totals" data-ref="statement-totals"></div>
|
||||
|
||||
<table id="statement-aging-table" cellspacing="0" class="print-content" data-ref="table"></table>
|
||||
<div id="statement-aging-table-totals" data-ref="statement-totals"></div>
|
||||
</div>
|
||||
<!-- End Print Content -->
|
||||
</td>
|
||||
@ -371,7 +373,12 @@
|
||||
<script>
|
||||
// Clear up space a bit, if [product-table, tasks-table, delivery-note-table] isn't present.
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
['product-table', 'task-table', 'delivery-note-table'].forEach((tableIdentifier) => {
|
||||
let tables = [
|
||||
'product-table', 'task-table', 'delivery-note-table',
|
||||
'statement-invoice-table', 'statement-payment-table', 'statement-aging-table-totals',
|
||||
];
|
||||
|
||||
tables.forEach((tableIdentifier) => {
|
||||
document.getElementById(tableIdentifier).childElementCount === 0
|
||||
? document.getElementById(tableIdentifier).style.display = 'none'
|
||||
: '';
|
||||
|
@ -2,7 +2,7 @@
|
||||
:root {
|
||||
--primary-color: $primary_color;
|
||||
--secondary-color: $secondary_color;
|
||||
--line-height: 1.6;
|
||||
--line-height: 1.6;
|
||||
}
|
||||
|
||||
body {
|
||||
@ -68,9 +68,7 @@
|
||||
line-height: var(--line-height);
|
||||
}
|
||||
|
||||
#product-table,
|
||||
#delivery-note-table,
|
||||
#task-table {
|
||||
[data-ref="table"] {
|
||||
min-width: 100%;
|
||||
table-layout: fixed;
|
||||
overflow-wrap: break-word;
|
||||
@ -84,35 +82,25 @@
|
||||
color: grey;
|
||||
}
|
||||
|
||||
#product-table > thead,
|
||||
#delivery-note-table > thead,
|
||||
#task-table > thead {
|
||||
[data-ref="table"] > thead {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#product-table > thead > tr > th,
|
||||
#delivery-note-table > thead > tr > th,
|
||||
#task-table > thead > tr > th {
|
||||
[data-ref="table"] > thead > tr > th {
|
||||
padding: 1rem;
|
||||
background-color: #e6e6e6;
|
||||
}
|
||||
|
||||
#product-table > thead > tr > th:last-child,
|
||||
#delivery-note-table > thead > tr > th:last-child,
|
||||
#task-table > thead > tr > th:last-child {
|
||||
[data-ref="table"] > thead > tr > th:last-child {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#product-table > tbody > tr > td,
|
||||
#delivery-note-table > tbody > tr > td,
|
||||
#task-table > tbody > tr > td {
|
||||
[data-ref="table"] > tbody > tr > td {
|
||||
border-bottom: 1px solid #e6e6e6;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
#product-table > tbody > tr > td:last-child,
|
||||
#delivery-note-table > tbody > tr > td:last-child,
|
||||
#task-table > tbody > tr > td:last-child {
|
||||
[data-ref="table"] > tbody > tr > td:last-child {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
@ -179,9 +167,7 @@
|
||||
}
|
||||
|
||||
/** Markdown-specific styles. **/
|
||||
#product-table h3,
|
||||
#task-table h3,
|
||||
#delivery-note-table h3 {
|
||||
[data-ref="table"] h3 {
|
||||
font-size: 1rem;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
@ -195,8 +181,14 @@
|
||||
padding-right: 7px;
|
||||
}
|
||||
|
||||
[data-ref="statement-totals"] {
|
||||
margin-top: 1rem;
|
||||
text-align: right;
|
||||
margin-right: .75rem;
|
||||
}
|
||||
|
||||
/** Useful snippets, uncomment to enable. **/
|
||||
|
||||
|
||||
/** Hide company logo **/
|
||||
/* .company-logo { display: none } */
|
||||
|
||||
@ -245,11 +237,20 @@
|
||||
|
||||
<div id="client-details"></div>
|
||||
|
||||
<table id="product-table" cellspacing="0"></table>
|
||||
<table id="product-table" cellspacing="0" data-ref="table"></table>
|
||||
|
||||
<table id="task-table" cellspacing="0"></table>
|
||||
<table id="task-table" cellspacing="0" data-ref="table"></table>
|
||||
|
||||
<table id="delivery-note-table" cellspacing="0"></table>
|
||||
<table id="delivery-note-table" cellspacing="0" data-ref="table"></table>
|
||||
|
||||
<table id="statement-invoice-table" cellspacing="0" data-ref="table"></table>
|
||||
<div id="statement-invoice-table-totals" data-ref="statement-totals"></div>
|
||||
|
||||
<table id="statement-payment-table" cellspacing="0" data-ref="table"></table>
|
||||
<div id="statement-payment-table-totals" data-ref="statement-totals"></div>
|
||||
|
||||
<table id="statement-aging-table" cellspacing="0" data-ref="table"></table>
|
||||
<div id="statement-aging-table-totals" data-ref="statement-totals"></div>
|
||||
|
||||
<div id="table-totals" cellspacing="0"></div>
|
||||
</div>
|
||||
@ -260,7 +261,12 @@
|
||||
<script>
|
||||
// Clear up space a bit, if [product-table, tasks-table, delivery-note-table] isn't present.
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
['product-table', 'task-table', 'delivery-note-table'].forEach((tableIdentifier) => {
|
||||
let tables = [
|
||||
'product-table', 'task-table', 'delivery-note-table',
|
||||
'statement-invoice-table', 'statement-payment-table', 'statement-aging-table-totals',
|
||||
];
|
||||
|
||||
tables.forEach((tableIdentifier) => {
|
||||
document.getElementById(tableIdentifier).childElementCount === 0
|
||||
? document.getElementById(tableIdentifier).style.display = 'none'
|
||||
: '';
|
||||
|
@ -95,9 +95,7 @@
|
||||
border-bottom: 1px solid var(--primary-color);
|
||||
}
|
||||
|
||||
#product-table,
|
||||
#delivery-note-table,
|
||||
#task-table {
|
||||
[data-ref="table"] {
|
||||
padding-left: 3rem;
|
||||
padding-right: 3rem;
|
||||
margin-top: 3rem;
|
||||
@ -113,58 +111,42 @@
|
||||
color: grey;
|
||||
}
|
||||
|
||||
#product-table > thead,
|
||||
#delivery-note-table > thead,
|
||||
#task-table > thead {
|
||||
[data-ref="table"] > thead {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#product-table > thead > tr > th,
|
||||
#delivery-note-table > thead > tr > th,
|
||||
#task-table > thead > tr > th {
|
||||
[data-ref="table"] > thead > tr > th {
|
||||
font-size: 1.2rem;
|
||||
padding: 1rem;
|
||||
background: var(--primary-color);
|
||||
color: white;
|
||||
}
|
||||
|
||||
#product-table > thead tr > th:last-child,
|
||||
#delivery-note-table > thead tr > th:last-child,
|
||||
#task-table > thead tr > th:last-child {
|
||||
[data-ref="table"] > thead tr > th:last-child {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#product-table > thead tr > th:first-child,
|
||||
#delivery-note-table > thead tr > th:first-child,
|
||||
#task-table > thead tr > th:first-child {
|
||||
[data-ref="table"] > thead tr > th:first-child {
|
||||
border-top-left-radius: 10px;
|
||||
border-bottom-left-radius: 10px;
|
||||
}
|
||||
|
||||
#product-table > thead tr > th:last-child,
|
||||
#delivery-note-table > thead tr > th:last-child,
|
||||
#task-table > thead tr > th:last-child {
|
||||
[data-ref="table"] > thead tr > th:last-child {
|
||||
border-top-right-radius: 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
}
|
||||
|
||||
#product-table > tbody > tr > td,
|
||||
#delivery-note-table > tbody > tr > td,
|
||||
#task-table > tbody > tr > td {
|
||||
[data-ref="table"] > tbody > tr > td {
|
||||
background-color: #F7F7F7;
|
||||
border-bottom: 1px solid var(--primary-color);
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
#product-table > tbody > tr > td:first-child,
|
||||
#delivery-note-table > tbody > tr > td:first-child,
|
||||
#task-table > tbody > tr > td:first-child {
|
||||
[data-ref="table"] > tbody > tr > td:first-child {
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
#product-table > tbody > tr > td:last-child,
|
||||
#delivery-note-table > tbody > tr > td:last-child,
|
||||
#task-table > tbody > tr > td:last-child {
|
||||
[data-ref="table"] > tbody > tr > td:last-child {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
@ -246,9 +228,7 @@
|
||||
}
|
||||
|
||||
/** Markdown-specific styles. **/
|
||||
#product-table h3,
|
||||
#task-table h3,
|
||||
#delivery-note-table h3 {
|
||||
[data-ref="table"] h3 {
|
||||
font-size: 1rem;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
@ -259,15 +239,22 @@
|
||||
min-width: 100%;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
|
||||
margin-left: -10px;
|
||||
margin-left: -10px;
|
||||
}
|
||||
|
||||
#footer-colors > * {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
[data-ref="statement-totals"] {
|
||||
margin-top: 1rem;
|
||||
text-align: right;
|
||||
padding-left: 3rem;
|
||||
padding-right: 3rem;
|
||||
}
|
||||
|
||||
/** Useful snippets, uncomment to enable. **/
|
||||
|
||||
|
||||
/** Hide company logo **/
|
||||
/* .company-logo { display: none } */
|
||||
|
||||
@ -333,11 +320,20 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="product-table" cellspacing="0"></table>
|
||||
<table id="product-table" cellspacing="0" data-ref="table"></table>
|
||||
|
||||
<table id="task-table" cellspacing="0"></table>
|
||||
<table id="task-table" cellspacing="0" data-ref="table"></table>
|
||||
|
||||
<table id="delivery-note-table" cellspacing="0"></table>
|
||||
<table id="delivery-note-table" cellspacing="0" data-ref="table"></table>
|
||||
|
||||
<table id="statement-invoice-table" cellspacing="0" data-ref="table"></table>
|
||||
<div id="statement-invoice-table-totals" data-ref="statement-totals"></div>
|
||||
|
||||
<table id="statement-payment-table" cellspacing="0" data-ref="table"></table>
|
||||
<div id="statement-payment-table-totals" data-ref="statement-totals"></div>
|
||||
|
||||
<table id="statement-aging-table" cellspacing="0" data-ref="table"></table>
|
||||
<div id="statement-aging-table-totals" data-ref="statement-totals"></div>
|
||||
|
||||
<div id="table-totals" cellspacing="0"></div>
|
||||
</div>
|
||||
@ -359,7 +355,12 @@
|
||||
<script>
|
||||
// Clear up space a bit, if [product-table, tasks-table, delivery-note-table] isn't present.
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
['product-table', 'task-table', 'delivery-note-table'].forEach((tableIdentifier) => {
|
||||
let tables = [
|
||||
'product-table', 'task-table', 'delivery-note-table',
|
||||
'statement-invoice-table', 'statement-payment-table', 'statement-aging-table-totals',
|
||||
];
|
||||
|
||||
tables.forEach((tableIdentifier) => {
|
||||
document.getElementById(tableIdentifier).childElementCount === 0
|
||||
? document.getElementById(tableIdentifier).style.display = 'none'
|
||||
: '';
|
||||
|
@ -122,18 +122,14 @@
|
||||
|
||||
.body-wrapper {}
|
||||
|
||||
#product-table,
|
||||
#delivery-note-table,
|
||||
#task-table {
|
||||
[data-ref="table"] {
|
||||
min-width: 100%;
|
||||
table-layout: fixed;
|
||||
overflow-wrap: break-word;
|
||||
margin-top: 3rem;
|
||||
}
|
||||
|
||||
#product-table > thead > tr > th,
|
||||
#delivery-note-table > thead > tr > th,
|
||||
#task-table > thead > tr > th {
|
||||
[data-ref="table"] > thead > tr > th {
|
||||
text-transform: uppercase;
|
||||
font-weight: normal;
|
||||
padding: 1rem;
|
||||
@ -142,28 +138,20 @@
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
#product-table > thead > tr > th:last-child,
|
||||
#delivery-note-table > thead > tr > th:last-child,
|
||||
#task-table > thead > tr > th:last-child {
|
||||
[data-ref="table"] > thead > tr > th:last-child {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#product-table > tbody > tr > td,
|
||||
#delivery-note-table > tbody > tr > td,
|
||||
#task-table > tbody > tr > td {
|
||||
[data-ref="table"] > tbody > tr > td {
|
||||
border-bottom: 1px solid #e6e6e6;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
#product-table > tbody > tr > td:first-child,
|
||||
#delivery-note-table > tbody > tr > td:first-child,
|
||||
#task-table > tbody > tr > td:first-child {
|
||||
[data-ref="table"] > tbody > tr > td:first-child {
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
#product-table > tbody > tr > td:last-child,
|
||||
#delivery-note-table > tbody > tr > td:last-child,
|
||||
#task-table > tbody > tr > td:last-child {
|
||||
[data-ref="table"] > tbody > tr > td:last-child {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
@ -229,15 +217,13 @@
|
||||
}
|
||||
|
||||
/** Markdown-specific styles. **/
|
||||
#product-table h3,
|
||||
#task-table h3,
|
||||
#delivery-note-table h3 {
|
||||
[data-ref="table"] h3 {
|
||||
font-size: 1rem;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/** Useful snippets, uncomment to enable. **/
|
||||
|
||||
|
||||
/** Hide company logo **/
|
||||
/* .company-logo { display: none } */
|
||||
|
||||
@ -309,11 +295,20 @@
|
||||
</div>
|
||||
|
||||
<div class="body-wrapper">
|
||||
<table id="product-table" cellspacing="0"></table>
|
||||
<table id="product-table" cellspacing="0" data-ref="table"></table>
|
||||
|
||||
<table id="task-table" cellspacing="0"></table>
|
||||
<table id="task-table" cellspacing="0" data-ref="table"></table>
|
||||
|
||||
<table id="delivery-note-table" cellspacing="0"></table>
|
||||
<table id="delivery-note-table" cellspacing="0" data-ref="table"></table>
|
||||
|
||||
<table id="statement-invoice-table" cellspacing="0" data-ref="table"></table>
|
||||
<div id="statement-invoice-table-totals" data-ref="statement-totals"></div>
|
||||
|
||||
<table id="statement-payment-table" cellspacing="0" data-ref="table"></table>
|
||||
<div id="statement-payment-table-totals" data-ref="statement-totals"></div>
|
||||
|
||||
<table id="statement-aging-table" cellspacing="0" data-ref="table"></table>
|
||||
<div id="statement-aging-table-totals" data-ref="statement-totals"></div>
|
||||
|
||||
<div id="table-totals" cellspacing="0"></div>
|
||||
</div>
|
||||
@ -325,7 +320,12 @@
|
||||
<script>
|
||||
// Clear up space a bit, if [product-table, tasks-table, delivery-note-table] isn't present.
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
['product-table', 'task-table', 'delivery-note-table'].forEach((tableIdentifier) => {
|
||||
let tables = [
|
||||
'product-table', 'task-table', 'delivery-note-table',
|
||||
'statement-invoice-table', 'statement-payment-table', 'statement-aging-table-totals',
|
||||
];
|
||||
|
||||
tables.forEach((tableIdentifier) => {
|
||||
document.getElementById(tableIdentifier).childElementCount === 0
|
||||
? document.getElementById(tableIdentifier).style.display = 'none'
|
||||
: '';
|
||||
|
@ -43,7 +43,7 @@ Route::group(['middleware' => ['api_db', 'token_auth', 'locale'], 'prefix' => 'a
|
||||
Route::post('connected_account', 'ConnectedAccountController@index');
|
||||
Route::post('connected_account/gmail', 'ConnectedAccountController@handleGmailOauth');
|
||||
|
||||
Route::resource('client_statement', 'ClientStatementController@statement'); // name = (client_statement. index / create / show / update / destroy / edit
|
||||
Route::post('client_statement', 'ClientStatementController@statement')->name('client.statement');
|
||||
|
||||
Route::post('companies/purge/{company}', 'MigrationController@purgeCompany')->middleware('password_protected');
|
||||
Route::post('companies/purge_save_settings/{company}', 'MigrationController@purgeCompanySaveSettings')->middleware('password_protected');
|
||||
@ -159,8 +159,8 @@ Route::group(['middleware' => ['api_db', 'token_auth', 'locale'], 'prefix' => 'a
|
||||
|
||||
Route::post('templates', 'TemplateController@show')->name('templates.show');
|
||||
|
||||
Route::resource('tokens', 'TokenController')->middleware('password_protected'); // name = (tokens. index / create / show / update / destroy / edit
|
||||
Route::post('tokens/bulk', 'TokenController@bulk')->name('tokens.bulk')->middleware('password_protected');
|
||||
Route::resource('tokens', 'TokenController'); // name = (tokens. index / create / show / update / destroy / edit
|
||||
Route::post('tokens/bulk', 'TokenController@bulk')->name('tokens.bulk');
|
||||
|
||||
Route::get('settings/enable_two_factor', 'TwoFactorController@setupTwoFactor');
|
||||
Route::post('settings/enable_two_factor', 'TwoFactorController@enableTwoFactor');
|
||||
|
Loading…
x
Reference in New Issue
Block a user