added new structure controller function
This commit is contained in:
@@ -12,6 +12,7 @@ use App\Models\User\UserPermission;
|
||||
use App\Models\Corporation\CorpStructure;
|
||||
use App\Models\Finances\CorpMarketJournal;
|
||||
use App\Models\Finances\ReprocessingTaxJournal;
|
||||
use App\Models\Finances\StructureIndustryTaxJournal;
|
||||
|
||||
class StructureTaxHelper {
|
||||
private $corpId;
|
||||
@@ -62,6 +63,16 @@ class StructureTaxHelper {
|
||||
return $taxOwed;
|
||||
}
|
||||
|
||||
public function GetIndustryRevenue($start, $end) {
|
||||
$revenue = 0.00;
|
||||
|
||||
$revenue = StructureIndustryTaxJournal::where(['ref_type' => 'facility_industry_tax', 'second_party_id' => '98287666'])
|
||||
->whereBetween('date', [$start, $end])
|
||||
->sum('amount');
|
||||
|
||||
return $revenue;
|
||||
}
|
||||
|
||||
public function GetRevenue($corpId, $refType, $start, $end) {
|
||||
$revenue = 0.00;
|
||||
if($refType == 'Market') {
|
||||
|
||||
Reference in New Issue
Block a user