mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
container monthly report
This commit is contained in:
@@ -172,49 +172,49 @@ class CompaniesTableSeeder extends Seeder
|
||||
|
||||
}
|
||||
|
||||
if(true){
|
||||
$companies = OldCompany::all();
|
||||
|
||||
foreach($companies as $company){
|
||||
|
||||
$marking = explode("CIEF/", $company->marking);
|
||||
|
||||
if(count($marking) < 2){
|
||||
continue;
|
||||
}
|
||||
|
||||
$marking = str_replace(' ', '', str_replace('/', '', $marking[1]));
|
||||
|
||||
|
||||
/** @var Company $newCompany */
|
||||
$newCompany = $this->createCompanyProcessor->execute($company->name, CompanyType::COMPANY_BUSINESS, ApprovalStatus::PENDING_SUBMISSION);
|
||||
|
||||
$this->updatesCompanyStatus->execute($newCompany, ApprovalStatus::APPROVED);
|
||||
|
||||
/** @var CompanyModule $companyModule */
|
||||
$companyModule = $this->createCompanyModuleProcessor->execute($newCompany, BusinessType::IMPORTER);
|
||||
|
||||
$connectionObject = new CompanyConnectionObject($companyModule, 'CIEF', $marking);
|
||||
|
||||
$connection = $this->createsCompanyConnection->execute($connectionObject);
|
||||
$this->approvesCompanyConnection->execute($connection);
|
||||
|
||||
$i = 0;
|
||||
foreach($company->addresses as $address){
|
||||
$this->createAddressFromOldAddressProcessor->execute($address, $companyModule);
|
||||
$contact = preg_replace("/[^0-9.]/", "", $address->contact);
|
||||
if($contact){
|
||||
$i++;
|
||||
if($i === 1) {
|
||||
$contactObject = new ContactObject('', $contact, $company->email, '',);
|
||||
$this->createContactProcessor->execute($contactObject, $newCompany);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
// if(true){
|
||||
// $companies = OldCompany::all();
|
||||
//
|
||||
// foreach($companies as $company){
|
||||
//
|
||||
// $marking = explode("CIEF/", $company->marking);
|
||||
//
|
||||
// if(count($marking) < 2){
|
||||
// continue;
|
||||
// }
|
||||
//
|
||||
// $marking = str_replace(' ', '', str_replace('/', '', $marking[1]));
|
||||
//
|
||||
//
|
||||
// /** @var Company $newCompany */
|
||||
// $newCompany = $this->createCompanyProcessor->execute($company->name, CompanyType::COMPANY_BUSINESS, ApprovalStatus::PENDING_SUBMISSION);
|
||||
//
|
||||
// $this->updatesCompanyStatus->execute($newCompany, ApprovalStatus::APPROVED);
|
||||
//
|
||||
// /** @var CompanyModule $companyModule */
|
||||
// $companyModule = $this->createCompanyModuleProcessor->execute($newCompany, BusinessType::IMPORTER);
|
||||
//
|
||||
// $connectionObject = new CompanyConnectionObject($companyModule, 'CIEF', $marking);
|
||||
//
|
||||
// $connection = $this->createsCompanyConnection->execute($connectionObject);
|
||||
// $this->approvesCompanyConnection->execute($connection);
|
||||
//
|
||||
// $i = 0;
|
||||
// foreach($company->addresses as $address){
|
||||
// $this->createAddressFromOldAddressProcessor->execute($address, $companyModule);
|
||||
// $contact = preg_replace("/[^0-9.]/", "", $address->contact);
|
||||
// if($contact){
|
||||
// $i++;
|
||||
// if($i === 1) {
|
||||
// $contactObject = new ContactObject('', $contact, $company->email, '',);
|
||||
// $this->createContactProcessor->execute($contactObject, $newCompany);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -143,7 +143,7 @@ Route::get('/report', function(){
|
||||
|
||||
$total += $cbm;
|
||||
|
||||
echo $container->reference.': '.$cbm.'<br><br><br>';
|
||||
echo $container->reference.': '.$cbm.'<br><br>';
|
||||
}
|
||||
|
||||
echo '<br><br><br>total cbm: '. $total;
|
||||
|
||||
Reference in New Issue
Block a user