1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
store_barcode.php
См. документацию.
1<?php
2
4
6{
7 public static function CheckFields($ACTION, &$arFields, $ID = 0)
8 {
9 if (defined("SALE_DEBUG") && SALE_DEBUG)
10 CSaleHelper::WriteToLog("CSaleStoreBarcode checking fields", array("ACTION" => $ACTION, "arFields" => $arFields), "SSBA1");
11
12 if ((is_set($arFields, "BASKET_ID") || $ACTION=="ADD") && $arFields["BASKET_ID"] == '')
13 {
14 $GLOBALS["APPLICATION"]->ThrowException(GetMessage("SSB_EMPTY_BASKET_ID"), "BARCODE_ADD_EMPTY_BASKET_ID");
15 return false;
16 }
17
18 if ((is_set($arFields, "BASKET_ID") || $ACTION=="ADD") && $arFields["BASKET_ID"] == '')
19 {
20 $GLOBALS["APPLICATION"]->ThrowException(GetMessage("SSB_EMPTY_STORE_ID"), "BARCODE_ADD_EMPTY_STORE_ID");
21 return false;
22 }
23
24 if ((is_set($arFields, "QUANTITY") || $ACTION=="ADD") && $arFields["QUANTITY"] == '')
25 {
26 $GLOBALS["APPLICATION"]->ThrowException(GetMessage("SSB_EMPTY_QUANTITY"), "BARCODE_ADD_EMPTY_QUANTITY");
27 return false;
28 }
29
30 return true;
31 }
32
33 public static function GetByID($ID)
34 {
35 global $DB;
36
37 $ID = intval($ID);
38
39 $strSql =
40 "SELECT O.*, ".
41 " ".$DB->DateToCharFunction("O.DATE_CREATE", "FULL")." as DATE_CREATE, ".
42 " ".$DB->DateToCharFunction("O.DATE_MODIFY", "FULL")." as DATE_MODIFY ".
43 "FROM b_sale_store_barcode O ".
44 "WHERE O.ID = ".$ID."";
45 $db_res = $DB->Query($strSql);
46
47 if ($res = $db_res->Fetch())
48 {
49 return $res;
50 }
51
52 return False;
53 }
54
55 public static function Delete($ID)
56 {
57 global $DB;
58
59 $ID = intval($ID);
60 if ($ID <= 0)
61 return False;
62
63 return $DB->Query("DELETE FROM b_sale_store_barcode WHERE ID = ".$ID." ", true);
64 }
65}
$db_res
Определения options_user_settings.php:8
static Delete($ID)
Определения store_barcode.php:55
static GetByID($ID)
Определения store_barcode.php:33
static CheckFields($ACTION, &$arFields, $ID=0)
Определения store_barcode.php:7
static WriteToLog($text, $arVars=array(), $code="")
Определения helper.php:35
$arFields
Определения dblapprove.php:5
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$res
Определения filter_act.php:7
if($ajaxMode) $ID
Определения get_user.php:27
global $DB
Определения cron_frame.php:29
$ACTION
Определения csv_new_setup.php:27
IncludeModuleLangFile($filepath, $lang=false, $bReturnArray=false)
Определения tools.php:3778
is_set($a, $k=false)
Определения tools.php:2133
GetMessage($name, $aReplace=null)
Определения tools.php:3397
const SALE_DEBUG
Определения include.php:4
$GLOBALS['_____370096793']
Определения update_client.php:1