mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
Deleted some lines of codes
This commit is contained in:
-36
@@ -167,33 +167,6 @@ class CheckStorageInvoiceTransactionProcessor
|
||||
return null;
|
||||
}
|
||||
|
||||
// private function getEtaFromPackingList($packingList){
|
||||
// if ($packingList) {
|
||||
// $package = $packingList->packages->first();
|
||||
// if ($package) {
|
||||
// $container = $package->container()->first();
|
||||
// if ($container) {
|
||||
// $transport = $container->transports->first();
|
||||
// if ($transport) {
|
||||
// // $container->transports()->first()->update(['drop_date' => $unstuffingDate, 'status' => ApprovalStatus::COMPLETED]);
|
||||
// $arrivalDateAtChinaWarehouse = Carbon::parse($transport->drop_date);
|
||||
// // $arrivalDateAtChinaWarehouse = Carbon::parse('2023-11-01 00:00:00');
|
||||
// $dateToCompare = Carbon::parse('2023-10-01 00:00:00'); //cief todo: to update this
|
||||
// if ($arrivalDateAtChinaWarehouse->isAfter($dateToCompare)) {
|
||||
// Log::channel('storage_invoices')->info('transport: '.json_encode($transport));
|
||||
// Log::channel('storage_invoices')->info('dateToCompare: '.$dateToCompare.', arrivalDateAtChinaWarehouse: '.$arrivalDateAtChinaWarehouse);
|
||||
// $schedule = $transport->schedules->last();
|
||||
// if ($schedule) {
|
||||
// return $schedule->eta;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
|
||||
private function processSingleTransactionOfTypeShippingInvoice($transaction, $destinationWarehousePackage, $company_module_id, $eta, $isBackDoorCheck){
|
||||
$pricePerCBM = 3;
|
||||
$resultNumberOfDaysFree = 10;
|
||||
@@ -202,16 +175,7 @@ class CheckStorageInvoiceTransactionProcessor
|
||||
$currentDatetime = Carbon::now();
|
||||
$dt2 = $currentDatetime->copy()->addDay()->startOfDay();
|
||||
$resultCurrentDate = $dt2->format('Y-m-d H:i:s');
|
||||
$test = Carbon::parse($dt2);
|
||||
$interval = Carbon::parse($dt2)->diff($dt1);
|
||||
$interval2 = $dt2->diff($dt1);
|
||||
|
||||
//cief todo: to be deleted
|
||||
Log::channel('storage_invoices')->info('currentDatetime: '.$currentDatetime);
|
||||
Log::channel('storage_invoices')->info('dt1: '.$dt1.', resultStartDate: '.$resultStartDate);
|
||||
Log::channel('storage_invoices')->info('dt2: '.$dt2.', resultCurrentDate: '.$resultCurrentDate);
|
||||
Log::channel('storage_invoices')->info('interval: '.$interval->days.', test: '.$test.', interval2: '.$interval2->days);
|
||||
|
||||
|
||||
$resultNumberOfDaysExceeded = $interval->days - $resultNumberOfDaysFree;
|
||||
$storageInvoice = $destinationWarehousePackage->transactions()->where('transactions.type', TransactionType::STORAGE_INVOICE)->first();
|
||||
|
||||
Reference in New Issue
Block a user