- Change $global-margin to $global_margin to keep consistency

- Update designs accordingly
- Update ChromiumPdf version
- Apply php-cs-fixer
This commit is contained in:
Benjamin Beganović 2020-12-15 11:45:04 +01:00
parent 3b5c592f25
commit 7ccd10adf9
16 changed files with 140 additions and 161 deletions

View File

@ -259,7 +259,6 @@ class DemoMode extends Command
$client = $company->clients->random();
$this->createProject($client, $u2->id);
}
}
@ -468,7 +467,6 @@ class DemoMode extends Command
}
$invoice->save();
}
private function createCredit($client, $assigned_user_id = null)

View File

@ -13,7 +13,6 @@ namespace App\Import\Definitions;
class InvoiceMap
{
public static function importable()
{
return [

View File

@ -122,8 +122,8 @@ use App\Listeners\Invoice\InvoiceArchivedActivity;
use App\Listeners\Invoice\InvoiceCancelledActivity;
use App\Listeners\Invoice\InvoiceDeletedActivity;
use App\Listeners\Invoice\InvoiceEmailActivity;
use App\Listeners\Invoice\InvoiceEmailFailedActivity;
use App\Listeners\Invoice\InvoiceEmailedNotification;
use App\Listeners\Invoice\InvoiceEmailFailedActivity;
use App\Listeners\Invoice\InvoicePaidActivity;
use App\Listeners\Invoice\InvoiceReminderEmailActivity;
use App\Listeners\Invoice\InvoiceRestoredActivity;
@ -131,8 +131,8 @@ use App\Listeners\Invoice\InvoiceReversedActivity;
use App\Listeners\Invoice\InvoiceViewedActivity;
use App\Listeners\Invoice\UpdateInvoiceActivity;
use App\Listeners\Misc\InvitationViewedListener;
use App\Listeners\Payment\PaymentEmailFailureActivity;
use App\Listeners\Payment\PaymentEmailedActivity;
use App\Listeners\Payment\PaymentEmailFailureActivity;
use App\Listeners\Payment\PaymentNotification;
use App\Listeners\Payment\PaymentRestoredActivity;
use App\Listeners\Quote\QuoteApprovedActivity;

View File

@ -92,7 +92,7 @@ class HtmlEngine
}
$data = [];
$data['$global-margin'] = ['value' => config('ninja.experimental_pdf_engine') ? '0cm' : '1cm', 'label' => ''];
$data['$global_margin'] = ['value' => config('ninja.experimental_pdf_engine') ? '0cm' : '1cm', 'label' => ''];
$data['$tax'] = ['value' => '', 'label' => ctrans('texts.tax')];
$data['$app_url'] = ['value' => $this->generateAppUrl(), 'label' => ''];
$data['$from'] = ['value' => '', 'label' => ctrans('texts.from')];

8
composer.lock generated
View File

@ -210,12 +210,12 @@
"source": {
"type": "git",
"url": "https://github.com/beganovich/chromium-pdf.git",
"reference": "0f1641f0f8272b68aa4942307b85fba5596a90c3"
"reference": "f6f32bb99616a1c1b7108250ccc438210134a99f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/beganovich/chromium-pdf/zipball/0f1641f0f8272b68aa4942307b85fba5596a90c3",
"reference": "0f1641f0f8272b68aa4942307b85fba5596a90c3",
"url": "https://api.github.com/repos/beganovich/chromium-pdf/zipball/f6f32bb99616a1c1b7108250ccc438210134a99f",
"reference": "f6f32bb99616a1c1b7108250ccc438210134a99f",
"shasum": ""
},
"require": {
@ -246,7 +246,7 @@
"issues": "https://github.com/beganovich/chromium-pdf/issues",
"source": "https://github.com/beganovich/chromium-pdf/tree/master"
},
"time": "2020-12-14T15:49:17+00:00"
"time": "2020-12-15T10:16:36+00:00"
},
{
"name": "brick/math",

View File

@ -13,7 +13,6 @@ class TaskFields extends Migration
*/
public function up()
{
Schema::table('tasks', function (Blueprint $table) {
$table->boolean('is_date_based')->default(false);
});
@ -21,7 +20,6 @@ class TaskFields extends Migration
Schema::table('companies', function (Blueprint $table) {
$table->boolean('default_task_is_date_based')->default(false);
});
}
/**

View File

@ -14,7 +14,7 @@
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-family: Arial, Helvetica, sans-serif;
margin: "$global-margin";
margin: $global_margin;
}
p {

View File

@ -12,7 +12,7 @@
}
@page {
margin: "$global-margin";
margin: $global_margin;
}
p {

View File

@ -9,7 +9,7 @@
-moz-osx-font-smoothing: grayscale;
font-family: Arial, Helvetica, sans-serif;
font-size: "$font_size";
margin: "$global-margin";
margin: $global_margin;
}
p {

View File

@ -30,7 +30,7 @@
}
body {
margin: "$global-margin";
margin: $global_margin;
}
.header-wrapper {

View File

@ -17,7 +17,7 @@
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-family: Arial, Helvetica, sans-serif;
margin: "$global-margin";
margin: $global_margin;
}
.company-logo-wrapper {

View File

@ -20,7 +20,7 @@
}
@page {
margin: "$global-margin";
margin: $global_margin;
}
.header-wrapper {

View File

@ -13,7 +13,7 @@
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-family: Arial, Helvetica, sans-serif;
margin: "$global-margin";
margin: $global_margin;
}
.header-wrapper {

View File

@ -17,7 +17,7 @@
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-family: Arial, Helvetica, sans-serif;
margin: "$global-margin";
margin: $global_margin;
}
.header-wrapper {

View File

@ -11,14 +11,9 @@
namespace Tests\Feature\Export;
use App\Models\Invoice;
use App\Models\Product;
use App\Utils\Traits\MakesHash;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Routing\Middleware\ThrottleRequests;
use Illuminate\Support\Facades\Storage;
use Illuminate\Validation\ValidationException;
use League\Csv\Reader;
use League\Csv\Statement;
use League\Csv\Writer;
use Tests\MockAccountData;
use Tests\TestCase;
@ -63,31 +58,24 @@ class ExportCsvTest extends TestCase
$merged_values = array_merge($header_invoice_values, (array)$header_item_values);
$merged_keys = array_merge($header_invoice_keys, (array)$header_item_keys);
info(print_r( $merged_keys,1));
info(print_r( $merged_values,1));
info(print_r($merged_keys, 1));
info(print_r($merged_values, 1));
foreach($merged_keys as &$key) {
foreach ($merged_keys as &$key) {
$key = ctrans('texts.'.$key);
}
$csv->insertOne($merged_keys);
foreach(Invoice::take(10)->get() as $invoice){
foreach($invoice->line_items as $item) {
foreach (Invoice::take(10)->get() as $invoice) {
foreach ($invoice->line_items as $item) {
unset($invoice->line_items);
$csv->insertOne(array_merge($invoice->toArray(), (array)$item));
}
}
Storage::put(base_path('invy.csv'), $csv->getContent());
}
}

View File

@ -10,11 +10,8 @@
*/
namespace Tests\Feature\Import;
use App\Models\Product;
use App\Utils\Traits\MakesHash;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Routing\Middleware\ThrottleRequests;
use Illuminate\Validation\ValidationException;
use League\Csv\Reader;
use League\Csv\Statement;
use Tests\MockAccountData;
@ -54,7 +51,6 @@ class ImportCsvTest extends TestCase
private function getCsvData($csvfile)
{
if (! ini_get('auto_detect_line_endings')) {
ini_set('auto_detect_line_endings', '1');
}