|
|
|
@ -253,6 +253,16 @@ END;
|
|
|
|
|
'cost',
|
|
|
|
|
'price'
|
|
|
|
|
], $where);
|
|
|
|
|
|
|
|
|
|
if (!empty($VARS['customer']) && $database->has('customers', ['customerid' => $VARS['customer']])) {
|
|
|
|
|
for ($n = 0; $n < count($items); $n++) {
|
|
|
|
|
$i = $items[$n];
|
|
|
|
|
if ($database->has('customer_pricing', ['AND' => ['itemid' => $i['id'], 'customerid' => $VARS['customer']]])) {
|
|
|
|
|
$items[$n]['price'] = $database->get('customer_pricing', 'price', ['AND' => ['itemid' => $i['id'], 'customerid' => $VARS['customer']]]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$items = (count($items) > 0 ? $items : false);
|
|
|
|
|
exit(json_encode(["status" => "OK", "items" => $items]));
|
|
|
|
|
case "customersearch":
|
|
|
|
|