Update
parent
be640f878f
commit
ff39f77fce
|
|
@ -88,9 +88,9 @@ class ChartController extends Controller
|
|||
$riceShrimpIndustry = $mapRiceShrimpIndustries[$key] ?? null;
|
||||
|
||||
if ($riceShrimpIndustry) {
|
||||
$areas[] = $riceShrimpIndustry->area;
|
||||
$productOutputs[] = $riceShrimpIndustry->product_output;
|
||||
$productValues[] = $riceShrimpIndustry->product_value;
|
||||
$areas[] = trim_trailing_zero($riceShrimpIndustry->area);
|
||||
$productOutputs[] = trim_trailing_zero($riceShrimpIndustry->product_output);
|
||||
$productValues[] = trim_trailing_zero($riceShrimpIndustry->product_value);
|
||||
} else {
|
||||
$areas[] = null;
|
||||
$productOutputs[] = null;
|
||||
|
|
@ -145,7 +145,7 @@ class ChartController extends Controller
|
|||
|
||||
foreach ($quarters as $key => $value) {
|
||||
$riceShrimpFlow = $riceShrimpFlows[$key] ?? null;
|
||||
$data[] = $riceShrimpFlow?->sales;
|
||||
$data[] = trim_trailing_zero($riceShrimpFlow?->sales);
|
||||
}
|
||||
|
||||
return [
|
||||
|
|
@ -191,8 +191,8 @@ class ChartController extends Controller
|
|||
foreach ($quarters as $key => $value) {
|
||||
$materiel = $materiels[$key] ?? null;
|
||||
|
||||
$data[] = $materiel?->lowest_price;
|
||||
$diffs[] = $materiel ? ($materiel->highest_price - $materiel->lowest_price) : null;
|
||||
$data[] = trim_trailing_zero($materiel?->lowest_price);
|
||||
$diffs[] = $materiel ? trim_trailing_zero($materiel->highest_price - $materiel->lowest_price) : null;
|
||||
}
|
||||
|
||||
return [
|
||||
|
|
|
|||
Loading…
Reference in New Issue