taxes helper

This commit is contained in:
2019-08-04 01:30:03 -05:00
parent 396d02e7a3
commit dfc5337b06
3 changed files with 18 additions and 3 deletions
+15 -1
View File
@@ -16,6 +16,9 @@ use App\Models\Finances\OfficeFeesJournal;
use App\Models\Finances\CorpMarketJournal;
use App\Models\Finances\JumpBridgeJournal;
use App\Models\Finances\PISaleJournal;
use App\Models\Finances\AllianceMarketJournal;
use App\Models\Finances\CorpMarketJournal;
use App\Models\Finances\CorpMarketStructure;
class TaxesHelper {
@@ -31,10 +34,21 @@ class TaxesHelper {
$this->end = $en;
}
public function GetAllianceMarketGross($start, $end, $corpId) {
$revenue = 0.00;
$revenue = AllianceMarketJournal::where([
'second_party_id' => $corpId,
])->whereBetween('date', [$start, $end])
->sum('amount');
return $revenue;
}
public function GetStructureMarketGross($start, $end, $corpId) {
$revenue = 0.00;
$revenu = CorpMarketJournal::where([
$revenue = CorpMarketJournal::where([
'second_party_id' => $corpId,
])->whereBetween('date', [$start, $end])
->sum('amount');