Index: branches/5.1.x/units/orders/orders_config.php =================================================================== diff -u -r13100 -r13147 --- branches/5.1.x/units/orders/orders_config.php (.../orders_config.php) (revision 13100) +++ branches/5.1.x/units/orders/orders_config.php (.../orders_config.php) (revision 13147) @@ -1,6 +1,6 @@ Array('type' => 'string','not_null' => '1','default' => ''), 'BillingAddress2' => Array('type' => 'string','not_null' => '1','default' => ''), 'BillingCity' => Array('type' => 'string','not_null' => '1','default' => ''), - 'BillingState' => Array('type' => 'string', 'formatter'=>'kOptionsFormatter', - 'options' => Array(), - 'option_key_field'=>'DestAbbr','option_title_field'=>'Translation', - 'not_null' => '1','default' => ''), + 'BillingState' => Array( + 'type' => 'string', + 'formatter' => 'kOptionsFormatter', 'options' => Array(), + 'not_null' => 1, 'default' => '' + ), 'BillingZip' => Array('type' => 'string','not_null' => '1','default' => ''), - 'BillingCountry' => Array('type' => 'string', 'formatter'=>'kOptionsFormatter', - 'options_sql'=>'SELECT %1$s - FROM '.TABLE_PREFIX.'StdDestinations - LEFT JOIN '.TABLE_PREFIX.'Phrase - ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName - WHERE - DestType=1 - AND - LanguageId = %2$s - ORDER BY Translation', - 'option_key_field'=>'DestAbbr','option_title_field'=>'Translation', - 'not_null' => '1','default' => 'USA'), + 'BillingCountry' => Array( + 'type' => 'string', + 'formatter' => 'kOptionsFormatter', + 'options_sql' => ' SELECT %1$s + FROM '.TABLE_PREFIX.'StdDestinations + LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName + WHERE DestType = 1 + ORDER BY l%2$s_Translation', + 'option_key_field' => 'DestAbbr', 'option_title_field' => 'l%2$s_Translation', + 'not_null' => 1, 'default' => 'USA' + ), 'VAT' => Array('type' => 'float','formatter'=>'kFormatter','not_null'=>1,'default' => '0','format'=>'%01.2f'), 'VATPercent' => Array('type' => 'float','formatter'=>'kFormatter','not_null'=>1,'default' => '0','format'=>'%01.3f'), 'PaymentType' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter','options_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PaymentTypes WHERE Status = 1', 'option_key_field'=>'PaymentTypeId','option_title_field'=>'Description', 'not_null' => 1, 'default' => 0), @@ -356,23 +356,22 @@ 'ShippingAddress1' => Array('type' => 'string','not_null' => '1','default' => ''), 'ShippingAddress2' => Array('type' => 'string','not_null' => '1','default' => ''), 'ShippingCity' => Array('type' => 'string','not_null' => '1','default' => ''), - 'ShippingState' => Array('type' => 'string', 'formatter'=>'kOptionsFormatter', - 'options' => Array(), - 'option_key_field'=>'DestAbbr','option_title_field'=>'Translation', - 'not_null' => '1','default' => ''), + 'ShippingState' => Array( + 'type' => 'string', + 'formatter' => 'kOptionsFormatter', 'options' => Array(), + 'not_null' => 1, 'default' => '' + ), 'ShippingZip' => Array('type' => 'string','not_null' => '1','default' => ''), - 'ShippingCountry' => Array('type' => 'string', 'formatter'=>'kOptionsFormatter', - 'options_sql'=>'SELECT %1$s - FROM '.TABLE_PREFIX.'StdDestinations - LEFT JOIN '.TABLE_PREFIX.'Phrase - ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName - WHERE - DestType=1 - AND - LanguageId = %2$s - ORDER BY Translation', - 'option_key_field'=>'DestAbbr','option_title_field'=>'Translation', - 'not_null' => '1','default' => 'USA'), + 'ShippingCountry' => Array( + 'type' => 'string', 'formatter' => 'kOptionsFormatter', + 'options_sql' => ' SELECT %1$s + FROM '.TABLE_PREFIX.'StdDestinations + LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName + WHERE DestType = 1 + ORDER BY l%2$s_Translation', + 'option_key_field' => 'DestAbbr', 'option_title_field' => 'l%2$s_Translation', + 'not_null' => 1, 'default' => 'USA' + ), 'ShippingType' => Array('type' => 'int','formatter'=>'kOptionsFormatter','options_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'ShippingType WHERE Status = 1','option_key_field'=>'ShippingID','option_title_field'=>'Name', 'not_null' => 1, 'default' => 0), 'ShippingCost' => Array('type' => 'double','formatter'=>'kFormatter','format'=>'%01.2f', 'not_null' => '1','default' => '0.00'), 'ShippingCustomerAccount' => Array('type' => 'string','not_null' => '1','default' => ''),