|
@@ -488,14 +488,6 @@ class providerControl extends SystemControl
|
|
|
|
|
|
private function cfg_format($input, $cfg)
|
|
|
{
|
|
|
- $specs = $input['specs'];
|
|
|
- $prices = $input['prices'];
|
|
|
- $data = [];
|
|
|
- foreach ($input['card_types'] as $key => $card_type)
|
|
|
- {
|
|
|
- $data[$card_type][$specs[$key]] = $prices[$key];
|
|
|
- }
|
|
|
-
|
|
|
foreach ($cfg['amount'] as $amount => $amt_items)
|
|
|
{
|
|
|
$new_amount = [];
|
|
@@ -505,9 +497,10 @@ class providerControl extends SystemControl
|
|
|
$card_types = $this->card_types($item['card_type']);
|
|
|
foreach ($card_types as $card_type)
|
|
|
{
|
|
|
+ $key = "price-{$card_type}-{$amount}";
|
|
|
$arr = [
|
|
|
'goods_id' => $goods_id,
|
|
|
- 'price' => floatval($data[$card_type][$amount]),
|
|
|
+ 'price' => floatval($input[$key]),
|
|
|
'quality' => $quality,
|
|
|
'card_type' => mtopcard\scard_type($card_type)
|
|
|
];
|