hotfix changement intempestif de format de date
This commit is contained in:
parent
bcbad93ba1
commit
bab32d5aff
1 changed files with 6 additions and 7 deletions
|
|
@ -65,25 +65,23 @@ class ImportMoba extends Command
|
|||
}
|
||||
$code_boite = $data[0];
|
||||
$code_ede = $data[1];
|
||||
//format dans le fichier Y-m-d
|
||||
$date_ponte = $data[2];
|
||||
list($d, $m, $y) = explode('/', $date_ponte);
|
||||
$datePonte = $y . '-' . $m . '-' . $d;
|
||||
$code_produit = $data[3];
|
||||
$libelle_produit = $data[4];
|
||||
$lot_externe = $data[5];
|
||||
//format dans le fichier Y-m-d
|
||||
$dcr = $data[6];
|
||||
$ean = $data[7];
|
||||
list($d_dcr, $m_dcr, $y_dcr) = explode('/', $dcr);
|
||||
$dateDcr = $y_dcr . '-' . $m_dcr . '-' . $d_dcr;
|
||||
|
||||
$moba = new Moba();
|
||||
$moba->code_boite = $code_boite;
|
||||
$moba->code_ede = $code_ede;
|
||||
$moba->date_ponte = $datePonte;
|
||||
$moba->date_ponte = $date_ponte;
|
||||
$moba->code_produit = $code_produit;
|
||||
$moba->libelle_produit = $libelle_produit;
|
||||
$moba->lot_externe = $lot_externe;
|
||||
$moba->dcr = $dateDcr;
|
||||
$moba->dcr = $dcr;
|
||||
$moba->date_emballage = $date_emballage;
|
||||
$moba->ean13 = $ean;
|
||||
$moba->save();
|
||||
|
|
@ -96,7 +94,8 @@ class ImportMoba extends Command
|
|||
fwrite($logs, $logtxt);
|
||||
//scopy($file, 'archives/'.$file);
|
||||
unlink($file);
|
||||
unlink($file . '.ok');
|
||||
//il n'y a plus de fichier .ok apparement
|
||||
@unlink($file . '.ok');
|
||||
}
|
||||
fclose($logs);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue