Optimising Supplier Layout and source code placement
This commit is contained in:
@@ -116,8 +116,10 @@ class ImportCosts implements ShouldQueue
|
||||
// m[1] = Service, m[2] = Desc, m[3] = From Date, m[4] = To Date
|
||||
preg_match('#^([0-9]{10})\s+-\s+(.*)\(([0-9]+\s+[JFMASOND].*\s+[0-9]+)+\s+-\s+([0-9]+\s+[JFMASOND].*\s+[0-9]+)+\)$#',$fields[$x],$m);
|
||||
|
||||
if (count($m) !== 5)
|
||||
throw new \Exception(sprintf('ERROR: Description didnt parse [%s] on line [%d]',$fields[$x],$c));
|
||||
if (count($m) !== 5) {
|
||||
dump(sprintf('ERROR: Description didnt parse [%s] on line [%d]',$fields[$x],$c));
|
||||
continue;
|
||||
}
|
||||
|
||||
$cost = ($x=$this->getColumnKey('PRICETOTAL')) ? str_replace([',','$'],'',$fields[$x]) : NULL;
|
||||
$start_at = Carbon::createFromFormat('d M Y',$m[3]);
|
||||
|
Reference in New Issue
Block a user