email report template

This commit is contained in:
David Bomba 2023-11-29 23:23:34 +11:00
parent 01e232cad2
commit 3bf0f642e1
4 changed files with 43 additions and 4 deletions

View File

@ -67,7 +67,45 @@ class EmailReport
*/ */
public string $end_date = ''; public string $end_date = '';
/******************************* Parameters **********************************/
/** @var string $report_name */ /** @var string $report_name */
public string $report_name = ''; public string $report_name = '';
/**
* Optional array of report keys for
* filter the columns of the report
*
* @var array $report_keys
*
* */
public array $report_keys = [];
/** Profit Loss Parameters */
public bool $is_income_billed = true;
public bool $is_expense_billed = true;
public bool $include_tax = true;
/**
* Comma separated string of statuses for filtering the Invoice report
*
* all
* draft
* sent
* paid
* unpaid
* overdue
* viewed
*
* */
public string $status = '';
/**
* Comma separated list of product.product_keys
* to filter the report by
*/
public string $product_key = ''
} }

View File

@ -22,7 +22,10 @@ class ProfitLossRequest extends Request
*/ */
public function authorize() : bool public function authorize() : bool
{ {
return auth()->user()->isAdmin(); /** @var \App\Models\User $user */
$user = auth()->user();
return $user->isAdmin();
} }
public function rules() public function rules()

View File

@ -14,8 +14,6 @@ return new class extends Migration {
if(!Gateway::find(61) && Ninja::isHosted()) { if(!Gateway::find(61) && Ninja::isHosted()) {
$fields = new \stdClass; $fields = new \stdClass;
$fields->clientId = "";
$fields->secret = "";
$fields->testMode = false; $fields->testMode = false;
$paypal = new Gateway; $paypal = new Gateway;