Remove taxes from demo data set

This commit is contained in:
= 2021-04-18 09:04:40 +10:00
parent d47a0e1392
commit 6eaff79544
2 changed files with 61 additions and 60 deletions

View File

@ -388,20 +388,20 @@ class DemoMode extends Command
$invoice->line_items = $this->buildLineItems(rand(1, 10));
$invoice->uses_inclusive_taxes = false;
if (rand(0, 1)) {
$invoice->tax_name1 = 'GST';
$invoice->tax_rate1 = 10.00;
}
// if (rand(0, 1)) {
// $invoice->tax_name1 = 'GST';
// $invoice->tax_rate1 = 10.00;
// }
if (rand(0, 1)) {
$invoice->tax_name2 = 'VAT';
$invoice->tax_rate2 = 17.50;
}
// if (rand(0, 1)) {
// $invoice->tax_name2 = 'VAT';
// $invoice->tax_rate2 = 17.50;
// }
if (rand(0, 1)) {
$invoice->tax_name3 = 'CA Sales Tax';
$invoice->tax_rate3 = 5;
}
// if (rand(0, 1)) {
// $invoice->tax_name3 = 'CA Sales Tax';
// $invoice->tax_rate3 = 5;
// }
// $invoice->custom_value1 = $faker->date;
// $invoice->custom_value2 = rand(0, 1) ? 'yes' : 'no';
@ -455,20 +455,20 @@ class DemoMode extends Command
$invoice->line_items = $this->buildLineItems(rand(1, 10));
$invoice->uses_inclusive_taxes = false;
if (rand(0, 1)) {
$invoice->tax_name1 = 'GST';
$invoice->tax_rate1 = 10.00;
}
// if (rand(0, 1)) {
// $invoice->tax_name1 = 'GST';
// $invoice->tax_rate1 = 10.00;
// }
if (rand(0, 1)) {
$invoice->tax_name2 = 'VAT';
$invoice->tax_rate2 = 17.50;
}
// if (rand(0, 1)) {
// $invoice->tax_name2 = 'VAT';
// $invoice->tax_rate2 = 17.50;
// }
if (rand(0, 1)) {
$invoice->tax_name3 = 'CA Sales Tax';
$invoice->tax_rate3 = 5;
}
// if (rand(0, 1)) {
// $invoice->tax_name3 = 'CA Sales Tax';
// $invoice->tax_rate3 = 5;
// }
// $invoice->custom_value1 = $faker->date;
// $invoice->custom_value2 = rand(0, 1) ? 'yes' : 'no';
@ -504,20 +504,20 @@ class DemoMode extends Command
$credit->line_items = $this->buildLineItems(rand(1, 10));
$credit->uses_inclusive_taxes = false;
if (rand(0, 1)) {
$credit->tax_name1 = 'GST';
$credit->tax_rate1 = 10.00;
}
// if (rand(0, 1)) {
// $credit->tax_name1 = 'GST';
// $credit->tax_rate1 = 10.00;
// }
if (rand(0, 1)) {
$credit->tax_name2 = 'VAT';
$credit->tax_rate2 = 17.50;
}
// if (rand(0, 1)) {
// $credit->tax_name2 = 'VAT';
// $credit->tax_rate2 = 17.50;
// }
if (rand(0, 1)) {
$credit->tax_name3 = 'CA Sales Tax';
$credit->tax_rate3 = 5;
}
// if (rand(0, 1)) {
// $credit->tax_name3 = 'CA Sales Tax';
// $credit->tax_rate3 = 5;
// }
$credit->save();
@ -559,20 +559,20 @@ class DemoMode extends Command
$quote->line_items = $this->buildLineItems(rand(1, 10));
$quote->uses_inclusive_taxes = false;
if (rand(0, 1)) {
$quote->tax_name1 = 'GST';
$quote->tax_rate1 = 10.00;
}
// if (rand(0, 1)) {
// $quote->tax_name1 = 'GST';
// $quote->tax_rate1 = 10.00;
// }
if (rand(0, 1)) {
$quote->tax_name2 = 'VAT';
$quote->tax_rate2 = 17.50;
}
// if (rand(0, 1)) {
// $quote->tax_name2 = 'VAT';
// $quote->tax_rate2 = 17.50;
// }
if (rand(0, 1)) {
$quote->tax_name3 = 'CA Sales Tax';
$quote->tax_rate3 = 5;
}
// if (rand(0, 1)) {
// $quote->tax_name3 = 'CA Sales Tax';
// $quote->tax_rate3 = 5;
// }
$quote->save();
@ -600,20 +600,20 @@ class DemoMode extends Command
$item->quantity = 1;
//$item->cost = 10;
if (rand(0, 1)) {
$item->tax_name1 = 'GST';
$item->tax_rate1 = 10.00;
}
// if (rand(0, 1)) {
// $item->tax_name1 = 'GST';
// $item->tax_rate1 = 10.00;
// }
if (rand(0, 1)) {
$item->tax_name1 = 'VAT';
$item->tax_rate1 = 17.50;
}
// if (rand(0, 1)) {
// $item->tax_name1 = 'VAT';
// $item->tax_rate1 = 17.50;
// }
if (rand(0, 1)) {
$item->tax_name1 = 'Sales Tax';
$item->tax_rate1 = 5;
}
// if (rand(0, 1)) {
// $item->tax_name1 = 'Sales Tax';
// $item->tax_rate1 = 5;
// }
$product = Product::all()->random();

View File

@ -22,6 +22,7 @@ class TaskStatusFactory
$task_status->company_id = $company_id;
$task_status->name = '';
$task_status->color = '#fff';
$task_status->status_order = 9999;
return $task_status;
}