update payment and billing

This commit is contained in:
edmondlang
2022-08-07 17:11:26 +08:00
parent 9e756132ca
commit a2c7eddf7b
15 changed files with 308 additions and 26 deletions
+2 -2
View File
@@ -21,11 +21,11 @@ class AddressResource extends JsonResource
$centerPostcodeConstantObject = SegmentConstant::where('reference', SegmentConstants::CENTER_POSTCODE)->get();
$centerPostcodeConstant = $centerPostcodeConstantObject->isEmpty() ? [] : (array)$centerPostcodeConstantObject->first()->value;
$postcodeArea = in_array($this->postcode, $centerPostcodeConstant) ? 'CENTER_POSTCODE' : null;
$postcodeArea = in_array((String)$this->postcode, $centerPostcodeConstant) ? 'CENTER_POSTCODE' : null;
$outstationPostcodeConstantObject = SegmentConstant::where('reference', SegmentConstants::OUTSTATION_POSTCODE)->get();
$outstationPostcodeConstant = $outstationPostcodeConstantObject->isEmpty() ? [] : (array)$outstationPostcodeConstantObject->first()->value;
in_array($this->postcode, $outstationPostcodeConstant) ? $postcodeArea = 'OUTSTATION_POSTCODE' : null;
in_array((String)$this->postcode, $outstationPostcodeConstant) ? $postcodeArea = 'OUTSTATION_POSTCODE' : null;
return [
'id' => $this->id,