Index: branches/5.1.x/units/shipping/shipping_config.php =================================================================== diff -u -r13156 -r13549 --- branches/5.1.x/units/shipping/shipping_config.php (.../shipping_config.php) (revision 13156) +++ branches/5.1.x/units/shipping/shipping_config.php (.../shipping_config.php) (revision 13549) @@ -1,6 +1,6 @@ Array ('s' => '!la_title_EditingShippingType!'), 'new_titlefield' => Array ('s' => '!la_title_NewShippingType!'), ), - 'shipping_list'=>Array ( 'prefixes' => Array ('s_List'), + 'shipping_list' =>Array ( 'prefixes' => Array ('s_List'), 'format' => "!la_title_ShippingTypes!", ), - 'shipping_type_edit'=>Array ( 'prefixes' => Array ('s'), + 'shipping_type_edit' =>Array ( 'prefixes' => Array ('s'), 'format' => "#s_status# '#s_titlefield#' - !la_title_General!", ), @@ -112,45 +112,70 @@ Array ('mode' => 'AND', 'filters' => Array ('show_active', 'show_disabled'), 'type' => WHERE_FILTER), ), 'Filters' => Array ( - 'show_active' => Array ('label' =>'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ), + 'show_active' => Array ('label' => 'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ), 'show_disabled' => Array ('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ), ) ), - 'ListSQLs' => Array ( ''=> 'SELECT * FROM %s'), + 'ListSQLs' => Array ( '' => 'SELECT * FROM %s'), // key - special, value - list select sql - 'ItemSQLs' => Array ( ''=> 'SELECT * FROM %s'), + 'ItemSQLs' => Array ( '' => 'SELECT * FROM %s'), 'ListSortings' => Array ( '' => Array ( 'Sorting' => Array ('Name' => 'asc'), ) ), 'Fields' => Array ( - 'ShippingID' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'Code' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required'=>true, 'max_len'=>25, 'error_msgs' => Array ('required' => 'Please fill in')), - 'Name' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required'=>true, 'max_len'=>100, 'error_msgs' => Array ('required' => 'Please fill in')), - 'SpeedCode' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required' => true, 'max_len' => 25), - 'LocationFrom' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Riga', 2 => 'Salaspils', 3 => 'Chicago', 4 => 'Dublin'), 'not_null' => true, 'default' => 1), - 'Type' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (1 => 'la_ByWeight', 2 => 'la_ByItem', 3 => 'la_ByAmount', 4 => 'la_Handling'), 'not_null' => true, 'default' => 1), - 'BaseFee' => Array ('type' => 'float', 'min_value_inc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => true), - 'CODFlatSurcharge' => Array ('type' => 'float', 'min_value_inc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => true), - 'CODPercentSurcharge' => Array ('type' => 'float', 'min_value_inc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => true), - 'Status' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 1 => 'la_Active', 0 => 'la_Disabled', 2 => 'la_SelectedOnly' ), 'use_phrases' => 1, 'default' => 1, 'not_null' => true ), - 'CostType' => Array ('type' => 'int', 'options' => Array ( 1 => 'la_Flat', 2 => 'la_PerUnit', 3 => 'la_Combined' ), 'use_phrases' => 1, 'default' => 1, 'not_null' => true ), - 'ZeroIfEmpty' => Array ('type' => 'int', 'options' => Array ( 1 => 'la_Zeros', 0 => 'la_NoShipments' ), 'use_phrases' => 1, 'default' => 1, 'not_null' => true ), - 'PrecisionBeforeSep' => Array ('type' => 'int', 'options' => Array ( 1 => '1 digit', 2 => '2 digits', 3 => '3 digits', 4 => '4 digits' ), 'default' => 2, 'not_null' => true ), - 'PrecisionAfterSep' => Array ('type' => 'int', 'options' => Array ( 0 => 'none', 1 => '1 digit', 2 => '2 digits' ), 'default' => 2, 'not_null' => true ), - 'PortalGroups' => Array ('type' => 'string', 'default' => NULL), - 'FreeShippingMinAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'not_null' => 1, 'format' => '%.2f', 'default' => 0), - 'IsFreePromoShipping' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, 'use_phrases' => 1, 'options' => Array (0 => 'la_No', 1 => 'la_Yes', ), 'formatter' => 'kOptionsFormatter'), - 'InsuranceFee' => Array ('type' => 'float', 'default' => null), - 'InsuranceType' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (2 => 'la_Percent', 1 => 'la_Flat',), - 'not_null' => 1, 'default' => 2 - ), - ), + 'ShippingID' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'Code' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required' => 1, 'max_len' =>25, 'error_msgs' => Array ('required' => 'Please fill in')), + 'Name' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required' => 1, 'max_len' =>100, 'error_msgs' => Array ('required' => 'Please fill in')), + 'SpeedCode' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required' => 1, 'max_len' => 25), + 'LocationFrom' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array ( + 1 => 'Riga', + 2 => 'Salaspils', + 3 => 'Chicago', + 4 => 'Dublin' + ), + 'not_null' => 1, 'default' => 1 + ), + 'Type' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, + 'options' => Array (1 => 'la_ByWeight', 2 => 'la_ByItem', 3 => 'la_ByAmount', 4 => 'la_Handling'), + 'not_null' => 1, 'default' => 1), + 'BaseFee' => Array ('type' => 'float', 'min_value_inc' =>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => 1), + 'CODFlatSurcharge' => Array ('type' => 'float', 'min_value_inc' =>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => 1), + 'CODPercentSurcharge' => Array ('type' => 'float', 'min_value_inc' =>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => 1), + 'Status' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array ( 1 => 'la_Active', 0 => 'la_Disabled', 2 => 'la_SelectedOnly' ), 'use_phrases' => 1, + 'default' => 1, 'not_null' => 1, + ), + 'CostType' => Array ('type' => 'int', 'options' => Array ( 1 => 'la_Flat', 2 => 'la_PerUnit', 3 => 'la_Combined' ), 'use_phrases' => 1, 'default' => 1, 'not_null' => 1 ), + 'ZeroIfEmpty' => Array ('type' => 'int', 'options' => Array ( 1 => 'la_Zeros', 0 => 'la_NoShipments' ), 'use_phrases' => 1, 'default' => 1, 'not_null' => 1 ), + 'PrecisionBeforeSep' => Array ('type' => 'int', 'options' => Array ( 1 => '1 digit', 2 => '2 digits', 3 => '3 digits', 4 => '4 digits' ), 'default' => 2, 'not_null' => 1 ), + 'PrecisionAfterSep' => Array ('type' => 'int', 'options' => Array ( 0 => 'none', 1 => '1 digit', 2 => '2 digits' ), 'default' => 2, 'not_null' => 1 ), + 'PortalGroups' => Array ('type' => 'string', 'default' => null), + 'FreeShippingMinAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'not_null' => 1, 'format' => '%.2f', 'default' => 0), + 'IsFreePromoShipping' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1, + 'default' => 0, 'not_null' => 1, + ), + 'InsuranceFee' => Array ('type' => 'float', 'default' => null), + 'InsuranceType' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (2 => 'la_Percent', 1 => 'la_Flat',), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 2 + ), + ), 'Grids' => Array ( 'Default' => Array (