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