Просмотр исходного кода

160811

modify offline import sql, add exception information;

modify offline_order table, add sooooo much fields.
Ray Zhang 9 лет назад
Родитель
Сommit
366ef824ae

+ 1 - 1
RedAnt ERP Mobile/common/data_provider/iSalesDB.m

@@ -651,7 +651,7 @@ void decryptfield (sqlite3_context *context, int argc, sqlite3_value **argv) {
     
     NSString* create_offline_login=@"CREATE TABLE IF NOT EXISTS offline_login ( _id INTEGER PRIMARY KEY, username VARCHAR(40),password VARCHAR(40), can_show_price integer ,can_see_price integer,contact_id VARCHAR(20),user_type integer,can_cancel_order integer,can_set_cart_price integer,can_create_portfolio integer, can_delete_order integer,can_submit_order integer,can_set_tearsheet_price integer,can_create_order integer, can_update_contact_info integer, mode VARCHAR(20), default_price text, price text, user_id integer,sales_code text);";
     
-    NSString* create_offline_order=@"CREATE TABLE IF NOT EXISTS offline_order ( _id INTEGER PRIMARY KEY,so_id text, order_id text ,status integer, general_notes TEXT ,internal_notes text,signature  text,user_type integer,contact_id text,sales_rep TEXT,create_by TEXT, total_price float, create_time TIMESTAMP default (datetime('now', 'localtime')));";
+    NSString* create_offline_order=@"CREATE TABLE IF NOT EXISTS offline_order ( _id INTEGER PRIMARY KEY,so_id text, order_id text ,status integer, general_notes TEXT ,internal_notes text,signature  text,user_type integer,contact_id text,sales_rep TEXT,create_by TEXT, total_price float, erpOrderStatus integer, logist text, lift_gate integer, logistic_note text, paymentType text, credit_card_first_name text, credit_card_last_name text, credit_card_address1 text, credit_card_address2 text, credit_card_zipcode text, credit_card_type text, credit_card_number text, credit_card_security_code text, credit_card_expiration text,credit_card_city text, credit_card_state text,customer_cid text,customer_contact text,customer_email text,customer_phone text,customer_fax text,receive_cid text,receive_name text,receive_ext text,receive_contact text, receive_phone text,receive_fax text,receive_email text,sender_cid text,sender_name text,sender_ext text,sender_contact text, sender_phone text,sender_fax text,sender_email text,shipping_billto_cid text,shipping_billto_name text,shipping_billto_ext text,shipping_billto_contact text, shipping_billto_phone text,shipping_billto_fax text,shipping_billto_email text,billing_cid text,billing_name text,billing_ext text,billing_contact text, billing_phone text,billing_fax text,billing_email text,returnto_cid text,returnto_name text,returnto_ext text,returnto_contact text, returnto_phone text,returnto_fax text,returnto_email text, must_call int,poNumber text,comments text,comments_ext text,paymentsAndCredits float,shipping float,lift_gate_value float,handling_fee_value float,totalPrice float,TotalCuft float,TotalWeight float,TotalCarton float,sign_picpath text,create_time TIMESTAMP default (datetime('now', 'localtime')));";
     
     
     

+ 1 - 1
RedAnt ERP Mobile/iSales-NPD/AppDelegate.m

@@ -1542,7 +1542,7 @@
                                 if(errmsg==nil)
                                     errmsg="Unknown error.";
                                 NSString *nsmsg = [[NSString alloc]initWithUTF8String:errmsg];
-                                [NSException raise:@"offline update sql error" format:@"MSG:%@",nsmsg];
+                                [NSException raise:@"offline update sql error" format:@"FILE:%@  MSG:%@",sqlfile,nsmsg];
                             }
                             
                             sqlite3_free(errmsg);