Created
February 27, 2021 14:23
-
-
Save jongravois/765944c35953fd974a6270fc6fbf30ae to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Console\Commands; | |
use App\Models\MonthlyReportRow; | |
use App\Models\PostedInvoice; | |
use App\Models\Troll; | |
use Illuminate\Console\Command; | |
class TrollMonthlySalesReports extends Command | |
{ | |
protected $signature = 'uam:troll-monthly-sales-reports'; | |
protected $description = 'Hourly Command to update sales reports'; | |
public function handle() | |
{ | |
ini_set('memory_limit', '-1'); | |
ini_set('max_execution_time', 0); | |
/* OVERALL PERFORMANCE */ | |
MonthlyReportRow::whereId(1)->update($this->opGrossReporter()); | |
$this->line('Gross Sales Revenue updated'); | |
MonthlyReportRow::whereId(2)->update($this->opNetReporter()); | |
$this->line('Net Sales (less Repair & Credits) GSR updated'); | |
MonthlyReportRow::whereId(3)->update($this->opProfitReporter()); | |
$this->line('Actual Component Sales Margin GSR updated'); | |
MonthlyReportRow::whereId(5)->update($this->opArgGrossReporter()); | |
$this->line('Top Line for ARG Projects updated'); | |
MonthlyReportRow::whereId(6)->update($this->opArgProfitReporter()); | |
$this->line('Net Sales (less Repair & Credits) - ARG Projects updated'); | |
/* Gross Sales Revenue */ | |
MonthlyReportRow::whereId(7)->update($this->grossSalesReporter('MDUNCAN')); | |
$this->line('DUNCAN GSR updated'); | |
MonthlyReportRow::whereId(8)->update($this->grossSalesReporter('CHENDERSON')); | |
$this->line('CHENDERSON GSR updated'); | |
MonthlyReportRow::whereId(9)->update($this->grossSalesReporter('THUDSON')); | |
$this->line('THUDSON GSR updated'); | |
MonthlyReportRow::whereId(10)->update($this->grossSalesReporter('DMULLER')); | |
$this->line('DMULLER GSR updated'); | |
MonthlyReportRow::whereId(11)->update($this->grossSalesReporter('MWALKER')); | |
$this->line('MWALKER GSR updated'); | |
MonthlyReportRow::whereId(12)->update($this->grossSpecialReporter()); | |
$this->line('N351BU GSR updated'); | |
MonthlyReportRow::whereId(13)->update($this->grossSalesReporter('ASONG')); | |
$this->line('ASONG GSR updated'); | |
MonthlyReportRow::whereId(14)->update($this->grossSalesReporter('MQINN')); | |
$this->line('MQINN GSR updated'); | |
/* Repair Cost */ | |
MonthlyReportRow::whereId(16)->update($this->repairCostReporter('MDUNCAN')); | |
$this->line('DUNCAN RC updated'); | |
MonthlyReportRow::whereId(17)->update($this->repairCostReporter('CHENDERSON')); | |
$this->line('CHENDERSON RC updated'); | |
MonthlyReportRow::whereId(18)->update($this->repairCostReporter('THUDSON')); | |
$this->line('THUDSON RC updated'); | |
MonthlyReportRow::whereId(19)->update($this->repairCostReporter('DMULLER')); | |
$this->line('DMULLER RC updated'); | |
MonthlyReportRow::whereId(20)->update($this->repairCostReporter('MWALKER')); | |
$this->line('MWALKER RC updated'); | |
MonthlyReportRow::whereId(21)->update($this->repairSpecialReporter()); | |
$this->line('N351BU RC updated'); | |
MonthlyReportRow::whereId(22)->update($this->repairCostReporter('ASONG')); | |
$this->line('ASONG RC updated'); | |
MonthlyReportRow::whereId(23)->update($this->repairCostReporter('MQINN')); | |
$this->line('MQINN RC updated'); | |
/* Credit Returns */ | |
MonthlyReportRow::whereId(25)->update($this->creditReturnsReporter('MDUNCAN')); | |
$this->line('DUNCAN RC updated'); | |
MonthlyReportRow::whereId(26)->update($this->creditReturnsReporter('CHENDERSON')); | |
$this->line('CHENDERSON RC updated'); | |
MonthlyReportRow::whereId(27)->update($this->creditReturnsReporter('THUDSON')); | |
$this->line('THUDSON RC updated'); | |
MonthlyReportRow::whereId(28)->update($this->creditReturnsReporter('DMULLER')); | |
$this->line('DMULLER RC updated'); | |
MonthlyReportRow::whereId(29)->update($this->creditReturnsReporter('MWALKER')); | |
$this->line('MWALKER RC updated'); | |
MonthlyReportRow::whereId(30)->update($this->creditSpecialReporter()); | |
$this->line('N351BU RC updated'); | |
MonthlyReportRow::whereId(31)->update($this->creditReturnsReporter('ASONG')); | |
$this->line('ASONG RC updated'); | |
MonthlyReportRow::whereId(32)->update($this->creditReturnsReporter('MQINN')); | |
$this->line('MQINN RC updated'); | |
/* Sales Profits */ | |
MonthlyReportRow::whereId(34)->update($this->profitSalesReporter('MDUNCAN')); | |
$this->line('DUNCAN SP updated'); | |
MonthlyReportRow::whereId(35)->update($this->profitSalesReporter('CHENDERSON')); | |
$this->line('CHENDERSON SP updated'); | |
MonthlyReportRow::whereId(36)->update($this->profitSalesReporter('THUDSON')); | |
$this->line('THUDSON SP updated'); | |
MonthlyReportRow::whereId(37)->update($this->profitSalesReporter('DMULLER')); | |
$this->line('DMULLER SP updated'); | |
MonthlyReportRow::whereId(38)->update($this->profitSalesReporter('MWALKER')); | |
$this->line('MWALKER SP updated'); | |
MonthlyReportRow::whereId(39)->update($this->profitSpecialReporter()); | |
$this->line('N351BU SP updated'); | |
MonthlyReportRow::whereId(40)->update($this->profitSalesReporter('ASONG')); | |
$this->line('ASONG SP updated'); | |
MonthlyReportRow::whereId(41)->update($this->profitSalesReporter('MQINN')); | |
$this->line('MQINN SP updated'); | |
MonthlyReportRow::whereId(43)->update($this->mroGrossReporter()); | |
$this->line('MRO GROSS updated'); | |
MonthlyReportRow::whereId(44)->update($this->airlineGrossReporter()); | |
$this->line('Airline Gross updated'); | |
MonthlyReportRow::whereId(45)->update($this->oemGrossReporter()); | |
$this->line('OEM Gross updated'); | |
MonthlyReportRow::whereId(46)->update($this->noTypeGrossReporter()); | |
$this->line('No Type Gross updated'); | |
MonthlyReportRow::whereId(47)->update($this->mroProfitReporter()); | |
$this->line('MRO Profit updated'); | |
MonthlyReportRow::whereId(48)->update($this->airlineProfitReporter()); | |
$this->line('Airline Profit updated'); | |
MonthlyReportRow::whereId(49)->update($this->oemProfitReporter()); | |
$this->line('OEM Profit updated'); | |
MonthlyReportRow::whereId(50)->update($this->noTypeProfitReporter()); | |
$this->line('No Type Profit updated'); | |
MonthlyReportRow::whereId(51)->update($this->amerGrossReporter()); | |
$this->line('Amer Gross updated'); | |
MonthlyReportRow::whereId(52)->update($this->emeaGrossReporter()); | |
$this->line('EMEA Gross updated'); | |
MonthlyReportRow::whereId(53)->update($this->asiaGrossReporter()); | |
$this->line('ASIA Gross updated'); | |
MonthlyReportRow::whereId(54)->update($this->amerProfitReporter()); | |
$this->line('AMER Profit updated'); | |
MonthlyReportRow::whereId(55)->update($this->emeaProfitReporter()); | |
$this->line('EMEA Profit updated'); | |
MonthlyReportRow::whereId(56)->update($this->asiaProfitReporter()); | |
$this->line('ASIA Profit updated'); | |
MonthlyReportRow::whereId(57)->update($this->cat1GrossReporter()); | |
$this->line('Cat1 Gross updated'); | |
MonthlyReportRow::whereId(58)->update($this->cat2GrossReporter()); | |
$this->line('Cat2 Gross updated'); | |
MonthlyReportRow::whereId(59)->update($this->cat3GrossReporter()); | |
$this->line('Cat3 Gross updated'); | |
MonthlyReportRow::whereId(60)->update($this->catOtherGrossReporter()); | |
$this->line('No Cat Gross updated'); | |
MonthlyReportRow::whereId(61)->update($this->cat1ProfitReporter()); | |
$this->line('Cat1 Profit updated'); | |
MonthlyReportRow::whereId(62)->update($this->cat2ProfitReporter()); | |
$this->line('Cat2 Profit updated'); | |
MonthlyReportRow::whereId(63)->update($this->cat3ProfitReporter()); | |
$this->line('Cat3 Profit updated'); | |
MonthlyReportRow::whereId(64)->update($this->catOtherProfitReporter()); | |
$this->line('No Cat Profit updated'); | |
Troll::updateOrCreate([ | |
'title' => 'Troll Monthly Sales Report' | |
], [ | |
'last_run' =>now() | |
]); | |
return 0; | |
} // end function | |
public function airlineGrossReporter(): array | |
{ | |
return [ | |
'jan' => PostedInvoice::reportAirlineGross(1), | |
'feb' => PostedInvoice::reportAirlineGross(2), | |
'mar' => PostedInvoice::reportAirlineGross(3), | |
'apr' => PostedInvoice::reportAirlineGross(4), | |
'may' => PostedInvoice::reportAirlineGross(5), | |
'jun' => PostedInvoice::reportAirlineGross(6), | |
'jul' => PostedInvoice::reportAirlineGross(7), | |
'aug' => PostedInvoice::reportAirlineGross(8), | |
'sep' => PostedInvoice::reportAirlineGross(9), | |
'oct' => PostedInvoice::reportAirlineGross(10), | |
'nov' => PostedInvoice::reportAirlineGross(11), | |
'dec' => PostedInvoice::reportAirlineGross(12), | |
'total' => PostedInvoice::reportAirlineGross() | |
]; | |
} // end function | |
public function airlineProfitReporter(): array | |
{ | |
return [ | |
'jan' => PostedInvoice::reportAirlineProfit(1), | |
'feb' => PostedInvoice::reportAirlineProfit(2), | |
'mar' => PostedInvoice::reportAirlineProfit(3), | |
'apr' => PostedInvoice::reportAirlineProfit(4), | |
'may' => PostedInvoice::reportAirlineProfit(5), | |
'jun' => PostedInvoice::reportAirlineProfit(6), | |
'jul' => PostedInvoice::reportAirlineProfit(7), | |
'aug' => PostedInvoice::reportAirlineProfit(8), | |
'sep' => PostedInvoice::reportAirlineProfit(9), | |
'oct' => PostedInvoice::reportAirlineProfit(10), | |
'nov' => PostedInvoice::reportAirlineProfit(11), | |
'dec' => PostedInvoice::reportAirlineProfit(12), | |
'total' => PostedInvoice::reportAirlineProfit() | |
]; | |
} // end function | |
public function amerGrossReporter(): array | |
{ | |
return [ | |
'jan' => PostedInvoice::reportAmerGross(1), | |
'feb' => PostedInvoice::reportAmerGross(2), | |
'mar' => PostedInvoice::reportAmerGross(3), | |
'apr' => PostedInvoice::reportAmerGross(4), | |
'may' => PostedInvoice::reportAmerGross(5), | |
'jun' => PostedInvoice::reportAmerGross(6), | |
'jul' => PostedInvoice::reportAmerGross(7), | |
'aug' => PostedInvoice::reportAmerGross(8), | |
'sep' => PostedInvoice::reportAmerGross(9), | |
'oct' => PostedInvoice::reportAmerGross(10), | |
'nov' => PostedInvoice::reportAmerGross(11), | |
'dec' => PostedInvoice::reportAmerGross(12), | |
'total' => PostedInvoice::reportAmerGross() | |
]; | |
} // end function | |
public function amerProfitReporter(): array | |
{ | |
return [ | |
'jan' => PostedInvoice::reportAmerProfit(1), | |
'feb' => PostedInvoice::reportAmerProfit(2), | |
'mar' => PostedInvoice::reportAmerProfit(3), | |
'apr' => PostedInvoice::reportAmerProfit(4), | |
'may' => PostedInvoice::reportAmerProfit(5), | |
'jun' => PostedInvoice::reportAmerProfit(6), | |
'jul' => PostedInvoice::reportAmerProfit(7), | |
'aug' => PostedInvoice::reportAmerProfit(8), | |
'sep' => PostedInvoice::reportAmerProfit(9), | |
'oct' => PostedInvoice::reportAmerProfit(10), | |
'nov' => PostedInvoice::reportAmerProfit(11), | |
'dec' => PostedInvoice::reportAmerProfit(12), | |
'total' => PostedInvoice::reportAmerProfit() | |
]; | |
} // end function | |
public function asiaGrossReporter(): array | |
{ | |
return [ | |
'jan' => PostedInvoice::reportAsiaGross(1), | |
'feb' => PostedInvoice::reportAsiaGross(2), | |
'mar' => PostedInvoice::reportAsiaGross(3), | |
'apr' => PostedInvoice::reportAsiaGross(4), | |
'may' => PostedInvoice::reportAsiaGross(5), | |
'jun' => PostedInvoice::reportAsiaGross(6), | |
'jul' => PostedInvoice::reportAsiaGross(7), | |
'aug' => PostedInvoice::reportAsiaGross(8), | |
'sep' => PostedInvoice::reportAsiaGross(9), | |
'oct' => PostedInvoice::reportAsiaGross(10), | |
'nov' => PostedInvoice::reportAsiaGross(11), | |
'dec' => PostedInvoice::reportAsiaGross(12), | |
'total' => PostedInvoice::reportAsiaGross() | |
]; | |
} // end function | |
public function asiaProfitReporter(): array | |
{ | |
return [ | |
'jan' => PostedInvoice::reportAsiaProfit(1), | |
'feb' => PostedInvoice::reportAsiaProfit(2), | |
'mar' => PostedInvoice::reportAsiaProfit(3), | |
'apr' => PostedInvoice::reportAsiaProfit(4), | |
'may' => PostedInvoice::reportAsiaProfit(5), | |
'jun' => PostedInvoice::reportAsiaProfit(6), | |
'jul' => PostedInvoice::reportAsiaProfit(7), | |
'aug' => PostedInvoice::reportAsiaProfit(8), | |
'sep' => PostedInvoice::reportAsiaProfit(9), | |
'oct' => PostedInvoice::reportAsiaProfit(10), | |
'nov' => PostedInvoice::reportAsiaProfit(11), | |
'dec' => PostedInvoice::reportAsiaProfit(12), | |
'total' => PostedInvoice::reportAsiaProfit() | |
]; | |
} // end function | |
public function cat1GrossReporter(): array | |
{ | |
return [ | |
'jan' => PostedInvoice::reportCat1Gross(1), | |
'feb' => PostedInvoice::reportCat1Gross(2), | |
'mar' => PostedInvoice::reportCat1Gross(3), | |
'apr' => PostedInvoice::reportCat1Gross(4), | |
'may' => PostedInvoice::reportCat1Gross(5), | |
'jun' => PostedInvoice::reportCat1Gross(6), | |
'jul' => PostedInvoice::reportCat1Gross(7), | |
'aug' => PostedInvoice::reportCat1Gross(8), | |
'sep' => PostedInvoice::reportCat1Gross(9), | |
'oct' => PostedInvoice::reportCat1Gross(10), | |
'nov' => PostedInvoice::reportCat1Gross(11), | |
'dec' => PostedInvoice::reportCat1Gross(12), | |
'total' => PostedInvoice::reportCat1Gross() | |
]; | |
} // end function | |
public function cat1ProfitReporter(): array | |
{ | |
return [ | |
'jan' => PostedInvoice::reportCat1Profit(1), | |
'feb' => PostedInvoice::reportCat1Profit(2), | |
'mar' => PostedInvoice::reportCat1Profit(3), | |
'apr' => PostedInvoice::reportCat1Profit(4), | |
'may' => PostedInvoice::reportCat1Profit(5), | |
'jun' => PostedInvoice::reportCat1Profit(6), | |
'jul' => PostedInvoice::reportCat1Profit(7), | |
'aug' => PostedInvoice::reportCat1Profit(8), | |
'sep' => PostedInvoice::reportCat1Profit(9), | |
'oct' => PostedInvoice::reportCat1Profit(10), | |
'nov' => PostedInvoice::reportCat1Profit(11), | |
'dec' => PostedInvoice::reportCat1Profit(12), | |
'total' => PostedInvoice::reportCat1Profit() | |
]; | |
} // end function | |
public function cat2GrossReporter(): array | |
{ | |
return [ | |
'jan' => PostedInvoice::reportCat2Gross(1), | |
'feb' => PostedInvoice::reportCat2Gross(2), | |
'mar' => PostedInvoice::reportCat2Gross(3), | |
'apr' => PostedInvoice::reportCat2Gross(4), | |
'may' => PostedInvoice::reportCat2Gross(5), | |
'jun' => PostedInvoice::reportCat2Gross(6), | |
'jul' => PostedInvoice::reportCat2Gross(7), | |
'aug' => PostedInvoice::reportCat2Gross(8), | |
'sep' => PostedInvoice::reportCat2Gross(9), | |
'oct' => PostedInvoice::reportCat2Gross(10), | |
'nov' => PostedInvoice::reportCat2Gross(11), | |
'dec' => PostedInvoice::reportCat2Gross(12), | |
'total' => PostedInvoice::reportCat2Gross() | |
]; | |
} // end function | |
public function cat2ProfitReporter(): array | |
{ | |
return [ | |
'jan' => PostedInvoice::reportCat2Profit(1), | |
'feb' => PostedInvoice::reportCat2Profit(2), | |
'mar' => PostedInvoice::reportCat2Profit(3), | |
'apr' => PostedInvoice::reportCat2Profit(4), | |
'may' => PostedInvoice::reportCat2Profit(5), | |
'jun' => PostedInvoice::reportCat2Profit(6), | |
'jul' => PostedInvoice::reportCat2Profit(7), | |
'aug' => PostedInvoice::reportCat2Profit(8), | |
'sep' => PostedInvoice::reportCat2Profit(9), | |
'oct' => PostedInvoice::reportCat2Profit(10), | |
'nov' => PostedInvoice::reportCat2Profit(11), | |
'dec' => PostedInvoice::reportCat2Profit(12), | |
'total' => PostedInvoice::reportCat2Profit() | |
]; | |
} // end function | |
public function cat3GrossReporter(): array | |
{ | |
return [ | |
'jan' => PostedInvoice::reportCat3Gross(1), | |
'feb' => PostedInvoice::reportCat3Gross(2), | |
'mar' => PostedInvoice::reportCat3Gross(3), | |
'apr' => PostedInvoice::reportCat3Gross(4), | |
'may' => PostedInvoice::reportCat3Gross(5), | |
'jun' => PostedInvoice::reportCat3Gross(6), | |
'jul' => PostedInvoice::reportCat3Gross(7), | |
'aug' => PostedInvoice::reportCat3Gross(8), | |
'sep' => PostedInvoice::reportCat3Gross(9), | |
'oct' => PostedInvoice::reportCat3Gross(10), | |
'nov' => PostedInvoice::reportCat3Gross(11), | |
'dec' => PostedInvoice::reportCat3Gross(12), | |
'total' => PostedInvoice::reportCat3Gross() | |
]; | |
} // end function | |
public function cat3ProfitReporter(): array | |
{ | |
return [ | |
'jan' => PostedInvoice::reportCat3Profit(1), | |
'feb' => PostedInvoice::reportCat3Profit(2), | |
'mar' => PostedInvoice::reportCat3Profit(3), | |
'apr' => PostedInvoice::reportCat3Profit(4), | |
'may' => PostedInvoice::reportCat3Profit(5), | |
'jun' => PostedInvoice::reportCat3Profit(6), | |
'jul' => PostedInvoice::reportCat3Profit(7), | |
'aug' => PostedInvoice::reportCat3Profit(8), | |
'sep' => PostedInvoice::reportCat3Profit(9), | |
'oct' => PostedInvoice::reportCat3Profit(10), | |
'nov' => PostedInvoice::reportCat3Profit(11), | |
'dec' => PostedInvoice::reportCat3Profit(12), | |
'total' => PostedInvoice::reportCat3Profit() | |
]; | |
} // end function | |
public function catOtherGrossReporter(): array | |
{ | |
return [ | |
'jan' => PostedInvoice::reportCatOtherGross(1), | |
'feb' => PostedInvoice::reportCatOtherGross(2), | |
'mar' => PostedInvoice::reportCatOtherGross(3), | |
'apr' => PostedInvoice::reportCatOtherGross(4), | |
'may' => PostedInvoice::reportCatOtherGross(5), | |
'jun' => PostedInvoice::reportCatOtherGross(6), | |
'jul' => PostedInvoice::reportCatOtherGross(7), | |
'aug' => PostedInvoice::reportCatOtherGross(8), | |
'sep' => PostedInvoice::reportCatOtherGross(9), | |
'oct' => PostedInvoice::reportCatOtherGross(10), | |
'nov' => PostedInvoice::reportCatOtherGross(11), | |
'dec' => PostedInvoice::reportCatOtherGross(12), | |
'total' => PostedInvoice::reportCatOtherGross() | |
]; | |
} // end function | |
public function catOtherProfitReporter(): array | |
{ | |
return [ | |
'jan' => PostedInvoice::reportCatOtherProfit(1), | |
'feb' => PostedInvoice::reportCatOtherProfit(2), | |
'mar' => PostedInvoice::reportCatOtherProfit(3), | |
'apr' => PostedInvoice::reportCatOtherProfit(4), | |
'may' => PostedInvoice::reportCatOtherProfit(5), | |
'jun' => PostedInvoice::reportCatOtherProfit(6), | |
'jul' => PostedInvoice::reportCatOtherProfit(7), | |
'aug' => PostedInvoice::reportCatOtherProfit(8), | |
'sep' => PostedInvoice::reportCatOtherProfit(9), | |
'oct' => PostedInvoice::reportCatOtherProfit(10), | |
'nov' => PostedInvoice::reportCatOtherProfit(11), | |
'dec' => PostedInvoice::reportCatOtherProfit(12), | |
'total' => PostedInvoice::reportCatOtherProfit() | |
]; | |
} // end function | |
public function creditReturnsReporter($sp): array | |
{ | |
return [ | |
'jan' => PostedInvoice::reportCreditReturns($sp, 1), | |
'feb' => PostedInvoice::reportCreditReturns($sp, 2), | |
'mar' => PostedInvoice::reportCreditReturns($sp, 3), | |
'apr' => PostedInvoice::reportCreditReturns($sp, 4), | |
'may' => PostedInvoice::reportCreditReturns($sp, 5), | |
'jun' => PostedInvoice::reportCreditReturns($sp, 6), | |
'jul' => PostedInvoice::reportCreditReturns($sp, 7), | |
'aug' => PostedInvoice::reportCreditReturns($sp, 8), | |
'sep' => PostedInvoice::reportCreditReturns($sp, 9), | |
'oct' => PostedInvoice::reportCreditReturns($sp, 10), | |
'nov' => PostedInvoice::reportCreditReturns($sp, 11), | |
'dec' => PostedInvoice::reportCreditReturns($sp, 12), | |
'total' => PostedInvoice::reportCreditReturns($sp) | |
]; | |
} // end function | |
public function creditSpecialReporter(): array | |
{ | |
return [ | |
'jan' => PostedInvoice::reportB77Returns(1), | |
'feb' => PostedInvoice::reportB77Returns(2), | |
'mar' => PostedInvoice::reportB77Returns(3), | |
'apr' => PostedInvoice::reportB77Returns(4), | |
'may' => PostedInvoice::reportB77Returns(5), | |
'jun' => PostedInvoice::reportB77Returns(6), | |
'jul' => PostedInvoice::reportB77Returns(7), | |
'aug' => PostedInvoice::reportB77Returns(8), | |
'sep' => PostedInvoice::reportB77Returns(9), | |
'oct' => PostedInvoice::reportB77Returns(10), | |
'nov' => PostedInvoice::reportB77Returns(11), | |
'dec' => PostedInvoice::reportB77Returns(12), | |
'total' => PostedInvoice::reportB77Returns() | |
]; | |
} // end function | |
public function emeaGrossReporter(): array | |
{ | |
return [ | |
'jan' => PostedInvoice::reportEmeaGross(1), | |
'feb' => PostedInvoice::reportEmeaGross(2), | |
'mar' => PostedInvoice::reportEmeaGross(3), | |
'apr' => PostedInvoice::reportEmeaGross(4), | |
'may' => PostedInvoice::reportEmeaGross(5), | |
'jun' => PostedInvoice::reportEmeaGross(6), | |
'jul' => PostedInvoice::reportEmeaGross(7), | |
'aug' => PostedInvoice::reportEmeaGross(8), | |
'sep' => PostedInvoice::reportEmeaGross(9), | |
'oct' => PostedInvoice::reportEmeaGross(10), | |
'nov' => PostedInvoice::reportEmeaGross(11), | |
'dec' => PostedInvoice::reportEmeaGross(12), | |
'total' => PostedInvoice::reportEmeaGross() | |
]; | |
} // end function | |
public function emeaProfitReporter(): array | |
{ | |
return [ | |
'jan' => PostedInvoice::reportEmeaProfit(1), | |
'feb' => PostedInvoice::reportEmeaProfit(2), | |
'mar' => PostedInvoice::reportEmeaProfit(3), | |
'apr' => PostedInvoice::reportEmeaProfit(4), | |
'may' => PostedInvoice::reportEmeaProfit(5), | |
'jun' => PostedInvoice::reportEmeaProfit(6), | |
'jul' => PostedInvoice::reportEmeaProfit(7), | |
'aug' => PostedInvoice::reportEmeaProfit(8), | |
'sep' => PostedInvoice::reportEmeaProfit(9), | |
'oct' => PostedInvoice::reportEmeaProfit(10), | |
'nov' => PostedInvoice::reportEmeaProfit(11), | |
'dec' => PostedInvoice::reportEmeaProfit(12), | |
'total' => PostedInvoice::reportEmeaProfit() | |
]; | |
} // end function | |
public function grossSalesReporter($sp): array | |
{ | |
return [ | |
'jan' => PostedInvoice::reportGrossSales($sp, 1), | |
'feb' => PostedInvoice::reportGrossSales($sp, 2), | |
'mar' => PostedInvoice::reportGrossSales($sp, 3), | |
'apr' => PostedInvoice::reportGrossSales($sp, 4), | |
'may' => PostedInvoice::reportGrossSales($sp, 5), | |
'jun' => PostedInvoice::reportGrossSales($sp, 6), | |
'jul' => PostedInvoice::reportGrossSales($sp, 7), | |
'aug' => PostedInvoice::reportGrossSales($sp, 8), | |
'sep' => PostedInvoice::reportGrossSales($sp, 9), | |
'oct' => PostedInvoice::reportGrossSales($sp, 10), | |
'nov' => PostedInvoice::reportGrossSales($sp, 11), | |
'dec' => PostedInvoice::reportGrossSales($sp, 12), | |
'total' => PostedInvoice::reportGrossSales($sp) | |
]; | |
} // end function | |
public function grossSpecialReporter(): array | |
{ | |
return [ | |
'jan' => PostedInvoice::reportB77Gross(1), | |
'feb' => PostedInvoice::reportB77Gross(2), | |
'mar' => PostedInvoice::reportB77Gross(3), | |
'apr' => PostedInvoice::reportB77Gross(4), | |
'may' => PostedInvoice::reportB77Gross(5), | |
'jun' => PostedInvoice::reportB77Gross(6), | |
'jul' => PostedInvoice::reportB77Gross(7), | |
'aug' => PostedInvoice::reportB77Gross(8), | |
'sep' => PostedInvoice::reportB77Gross(9), | |
'oct' => PostedInvoice::reportB77Gross(10), | |
'nov' => PostedInvoice::reportB77Gross(11), | |
'dec' => PostedInvoice::reportB77Gross(12), | |
'total' => PostedInvoice::reportB77Gross() | |
]; | |
} // end function | |
public function mroGrossReporter(): array | |
{ | |
return [ | |
'jan' => PostedInvoice::reportMroGross(1), | |
'feb' => PostedInvoice::reportMroGross(2), | |
'mar' => PostedInvoice::reportMroGross(3), | |
'apr' => PostedInvoice::reportMroGross(4), | |
'may' => PostedInvoice::reportMroGross(5), | |
'jun' => PostedInvoice::reportMroGross(6), | |
'jul' => PostedInvoice::reportMroGross(7), | |
'aug' => PostedInvoice::reportMroGross(8), | |
'sep' => PostedInvoice::reportMroGross(9), | |
'oct' => PostedInvoice::reportMroGross(10), | |
'nov' => PostedInvoice::reportMroGross(11), | |
'dec' => PostedInvoice::reportMroGross(12), | |
'total' => PostedInvoice::reportMroGross() | |
]; | |
} // end function | |
public function mroProfitReporter(): array | |
{ | |
return [ | |
'jan' => PostedInvoice::reportMroProfit(1), | |
'feb' => PostedInvoice::reportMroProfit(2), | |
'mar' => PostedInvoice::reportMroProfit(3), | |
'apr' => PostedInvoice::reportMroProfit(4), | |
'may' => PostedInvoice::reportMroProfit(5), | |
'jun' => PostedInvoice::reportMroProfit(6), | |
'jul' => PostedInvoice::reportMroProfit(7), | |
'aug' => PostedInvoice::reportMroProfit(8), | |
'sep' => PostedInvoice::reportMroProfit(9), | |
'oct' => PostedInvoice::reportMroProfit(10), | |
'nov' => PostedInvoice::reportMroProfit(11), | |
'dec' => PostedInvoice::reportMroProfit(12), | |
'total' => PostedInvoice::reportMroProfit() | |
]; | |
} // end function | |
public function oemGrossReporter(): array | |
{ | |
return [ | |
'jan' => PostedInvoice::reportOemGross(1), | |
'feb' => PostedInvoice::reportOemGross(2), | |
'mar' => PostedInvoice::reportOemGross(3), | |
'apr' => PostedInvoice::reportOemGross(4), | |
'may' => PostedInvoice::reportOemGross(5), | |
'jun' => PostedInvoice::reportOemGross(6), | |
'jul' => PostedInvoice::reportOemGross(7), | |
'aug' => PostedInvoice::reportOemGross(8), | |
'sep' => PostedInvoice::reportOemGross(9), | |
'oct' => PostedInvoice::reportOemGross(10), | |
'nov' => PostedInvoice::reportOemGross(11), | |
'dec' => PostedInvoice::reportOemGross(12), | |
'total' => PostedInvoice::reportOemGross() | |
]; | |
} // end function | |
public function oemProfitReporter(): array | |
{ | |
return [ | |
'jan' => PostedInvoice::reportOemProfit(1), | |
'feb' => PostedInvoice::reportOemProfit(2), | |
'mar' => PostedInvoice::reportOemProfit(3), | |
'apr' => PostedInvoice::reportOemProfit(4), | |
'may' => PostedInvoice::reportOemProfit(5), | |
'jun' => PostedInvoice::reportOemProfit(6), | |
'jul' => PostedInvoice::reportOemProfit(7), | |
'aug' => PostedInvoice::reportOemProfit(8), | |
'sep' => PostedInvoice::reportOemProfit(9), | |
'oct' => PostedInvoice::reportOemProfit(10), | |
'nov' => PostedInvoice::reportOemProfit(11), | |
'dec' => PostedInvoice::reportOemProfit(12), | |
'total' => PostedInvoice::reportOemProfit() | |
]; | |
} // end function | |
public function noTypeGrossReporter(): array | |
{ | |
return [ | |
'jan' => PostedInvoice::reportNoTypeGross(1), | |
'feb' => PostedInvoice::reportNoTypeGross(2), | |
'mar' => PostedInvoice::reportNoTypeGross(3), | |
'apr' => PostedInvoice::reportNoTypeGross(4), | |
'may' => PostedInvoice::reportNoTypeGross(5), | |
'jun' => PostedInvoice::reportNoTypeGross(6), | |
'jul' => PostedInvoice::reportNoTypeGross(7), | |
'aug' => PostedInvoice::reportNoTypeGross(8), | |
'sep' => PostedInvoice::reportNoTypeGross(9), | |
'oct' => PostedInvoice::reportNoTypeGross(10), | |
'nov' => PostedInvoice::reportNoTypeGross(11), | |
'dec' => PostedInvoice::reportNoTypeGross(12), | |
'total' => PostedInvoice::reportNoTypeGross() | |
]; | |
} // end function | |
public function noTypeProfitReporter(): array | |
{ | |
return [ | |
'jan' => PostedInvoice::reportNoTypeProfit(1), | |
'feb' => PostedInvoice::reportNoTypeProfit(2), | |
'mar' => PostedInvoice::reportNoTypeProfit(3), | |
'apr' => PostedInvoice::reportNoTypeProfit(4), | |
'may' => PostedInvoice::reportNoTypeProfit(5), | |
'jun' => PostedInvoice::reportNoTypeProfit(6), | |
'jul' => PostedInvoice::reportNoTypeProfit(7), | |
'aug' => PostedInvoice::reportNoTypeProfit(8), | |
'sep' => PostedInvoice::reportNoTypeProfit(9), | |
'oct' => PostedInvoice::reportNoTypeProfit(10), | |
'nov' => PostedInvoice::reportNoTypeProfit(11), | |
'dec' => PostedInvoice::reportNoTypeProfit(12), | |
'total' => PostedInvoice::reportNoTypeProfit() | |
]; | |
} // end function | |
public function opGrossReporter(): array | |
{ | |
return [ | |
'jan' => PostedInvoice::reportOverallGross(1), | |
'feb' => PostedInvoice::reportOverallGross(2), | |
'mar' => PostedInvoice::reportOverallGross(3), | |
'apr' => PostedInvoice::reportOverallGross(4), | |
'may' => PostedInvoice::reportOverallGross(5), | |
'jun' => PostedInvoice::reportOverallGross(6), | |
'jul' => PostedInvoice::reportOverallGross(7), | |
'aug' => PostedInvoice::reportOverallGross(8), | |
'sep' => PostedInvoice::reportOverallGross(9), | |
'oct' => PostedInvoice::reportOverallGross(10), | |
'nov' => PostedInvoice::reportOverallGross(11), | |
'dec' => PostedInvoice::reportOverallGross(12), | |
'total' => PostedInvoice::reportOverallGross() | |
]; | |
} // end function | |
public function opArgGrossReporter(): array | |
{ | |
return [ | |
'jan' => PostedInvoice::reportArgGross(1), | |
'feb' => PostedInvoice::reportArgGross(2), | |
'mar' => PostedInvoice::reportArgGross(3), | |
'apr' => PostedInvoice::reportArgGross(4), | |
'may' => PostedInvoice::reportArgGross(5), | |
'jun' => PostedInvoice::reportArgGross(6), | |
'jul' => PostedInvoice::reportArgGross(7), | |
'aug' => PostedInvoice::reportArgGross(8), | |
'sep' => PostedInvoice::reportArgGross(9), | |
'oct' => PostedInvoice::reportArgGross(10), | |
'nov' => PostedInvoice::reportArgGross(11), | |
'dec' => PostedInvoice::reportArgGross(12), | |
'total' => PostedInvoice::reportArgGross() | |
]; | |
} // end function | |
public function opArgProfitReporter(): array | |
{ | |
return [ | |
'jan' => PostedInvoice::reportArgProfit(1), | |
'feb' => PostedInvoice::reportArgProfit(2), | |
'mar' => PostedInvoice::reportArgProfit(3), | |
'apr' => PostedInvoice::reportArgProfit(4), | |
'may' => PostedInvoice::reportArgProfit(5), | |
'jun' => PostedInvoice::reportArgProfit(6), | |
'jul' => PostedInvoice::reportArgProfit(7), | |
'aug' => PostedInvoice::reportArgProfit(8), | |
'sep' => PostedInvoice::reportArgProfit(9), | |
'oct' => PostedInvoice::reportArgProfit(10), | |
'nov' => PostedInvoice::reportArgProfit(11), | |
'dec' => PostedInvoice::reportArgProfit(12), | |
'total' => PostedInvoice::reportArgProfit() | |
]; | |
} // end function | |
public function opNetReporter(): array | |
{ | |
return [ | |
'jan' => PostedInvoice::reportOverallNet(1), | |
'feb' => PostedInvoice::reportOverallNet(2), | |
'mar' => PostedInvoice::reportOverallNet(3), | |
'apr' => PostedInvoice::reportOverallNet(4), | |
'may' => PostedInvoice::reportOverallNet(5), | |
'jun' => PostedInvoice::reportOverallNet(6), | |
'jul' => PostedInvoice::reportOverallNet(7), | |
'aug' => PostedInvoice::reportOverallNet(8), | |
'sep' => PostedInvoice::reportOverallNet(9), | |
'oct' => PostedInvoice::reportOverallNet(10), | |
'nov' => PostedInvoice::reportOverallNet(11), | |
'dec' => PostedInvoice::reportOverallNet(12), | |
'total' => PostedInvoice::reportOverallNet() | |
]; | |
} // end function | |
public function opProfitReporter(): array | |
{ | |
return [ | |
'jan' => PostedInvoice::reportOverallProfit(1), | |
'feb' => PostedInvoice::reportOverallProfit(2), | |
'mar' => PostedInvoice::reportOverallProfit(3), | |
'apr' => PostedInvoice::reportOverallProfit(4), | |
'may' => PostedInvoice::reportOverallProfit(5), | |
'jun' => PostedInvoice::reportOverallProfit(6), | |
'jul' => PostedInvoice::reportOverallProfit(7), | |
'aug' => PostedInvoice::reportOverallProfit(8), | |
'sep' => PostedInvoice::reportOverallProfit(9), | |
'oct' => PostedInvoice::reportOverallProfit(10), | |
'nov' => PostedInvoice::reportOverallProfit(11), | |
'dec' => PostedInvoice::reportOverallProfit(12), | |
'total' => PostedInvoice::reportOverallProfit() | |
]; | |
} // end function | |
public function profitSpecialReporter(): array | |
{ | |
return [ | |
'jan' => PostedInvoice::reportB77Profits(1), | |
'feb' => PostedInvoice::reportB77Profits(2), | |
'mar' => PostedInvoice::reportB77Profits(3), | |
'apr' => PostedInvoice::reportB77Profits(4), | |
'may' => PostedInvoice::reportB77Profits(5), | |
'jun' => PostedInvoice::reportB77Profits(6), | |
'jul' => PostedInvoice::reportB77Profits(7), | |
'aug' => PostedInvoice::reportB77Profits(8), | |
'sep' => PostedInvoice::reportB77Profits(9), | |
'oct' => PostedInvoice::reportB77Profits(10), | |
'nov' => PostedInvoice::reportB77Profits(11), | |
'dec' => PostedInvoice::reportB77Profits(12), | |
'total' => PostedInvoice::reportB77Profits() | |
]; | |
} // end function | |
public function profitSalesReporter($sp): array | |
{ | |
return [ | |
'jan' => PostedInvoice::reportSalesProfits($sp, 1), | |
'feb' => PostedInvoice::reportSalesProfits($sp, 2), | |
'mar' => PostedInvoice::reportSalesProfits($sp, 3), | |
'apr' => PostedInvoice::reportSalesProfits($sp, 4), | |
'may' => PostedInvoice::reportSalesProfits($sp, 5), | |
'jun' => PostedInvoice::reportSalesProfits($sp, 6), | |
'jul' => PostedInvoice::reportSalesProfits($sp, 7), | |
'aug' => PostedInvoice::reportSalesProfits($sp, 8), | |
'sep' => PostedInvoice::reportSalesProfits($sp, 9), | |
'oct' => PostedInvoice::reportSalesProfits($sp, 10), | |
'nov' => PostedInvoice::reportSalesProfits($sp, 11), | |
'dec' => PostedInvoice::reportSalesProfits($sp, 12), | |
'total' => PostedInvoice::reportSalesProfits($sp) | |
]; | |
} // end function | |
public function repairCostReporter($sp): array | |
{ | |
return [ | |
'jan' => PostedInvoice::reportRepairCosts($sp, 1), | |
'feb' => PostedInvoice::reportRepairCosts($sp, 2), | |
'mar' => PostedInvoice::reportRepairCosts($sp, 3), | |
'apr' => PostedInvoice::reportRepairCosts($sp, 4), | |
'may' => PostedInvoice::reportRepairCosts($sp, 5), | |
'jun' => PostedInvoice::reportRepairCosts($sp, 6), | |
'jul' => PostedInvoice::reportRepairCosts($sp, 7), | |
'aug' => PostedInvoice::reportRepairCosts($sp, 8), | |
'sep' => PostedInvoice::reportRepairCosts($sp, 9), | |
'oct' => PostedInvoice::reportRepairCosts($sp, 10), | |
'nov' => PostedInvoice::reportRepairCosts($sp, 11), | |
'dec' => PostedInvoice::reportRepairCosts($sp, 12), | |
'total' => PostedInvoice::reportRepairCosts($sp) | |
]; | |
} // end function | |
public function repairSpecialReporter(): array | |
{ | |
return [ | |
'jan' => PostedInvoice::reportB77Repair(1), | |
'feb' => PostedInvoice::reportB77Repair(2), | |
'mar' => PostedInvoice::reportB77Repair(3), | |
'apr' => PostedInvoice::reportB77Repair(4), | |
'may' => PostedInvoice::reportB77Repair(5), | |
'jun' => PostedInvoice::reportB77Repair(6), | |
'jul' => PostedInvoice::reportB77Repair(7), | |
'aug' => PostedInvoice::reportB77Repair(8), | |
'sep' => PostedInvoice::reportB77Repair(9), | |
'oct' => PostedInvoice::reportB77Repair(10), | |
'nov' => PostedInvoice::reportB77Repair(11), | |
'dec' => PostedInvoice::reportB77Repair(12), | |
'total' => PostedInvoice::reportB77Repair() | |
]; | |
} // end function | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment