Ver Fonte

1.修改NPD数据库,增加Payment Type表。
2.修改NPD Place Order离线Payment数据。

Pen Li há 8 anos atrás
pai
commit
bfd03aaf96

BIN
RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/macmini1.xcuserdatad/UserInterfaceState.xcuserstate


+ 363 - 187
RedAnt ERP Mobile/common/Functions/offline/OLDataProvider.m

@@ -336,7 +336,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
          else
          {
               if ([s_qty isEqualToString:@"null"] && [s_availability isEqualToString:@"0"])
-                  str_availability=@"<b>Availability:</b> Out of Stock";
+                  str_availability=@"<b>Availability:</b> In Production";
          }
         
         if([params[@"color"] boolValue]==false || color.length==0 )
@@ -8186,7 +8186,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
             orderinfo = [self replaceHtml:orderinfo String:@"InternalNotes_or_nbsp" withString:nsinternal_notes];
             
             NSString *payment = nil;
-            if([nspayment_type isEqualToString:@"Credit Card"])
+            if([nspayment_type isEqualToString:@"Credit Card"] || [nspayment_type isEqualToString:@"Visa/Master"])
             {
                 payment = [self textFileName:@"creditcardpayment.html"];
                 
@@ -8219,6 +8219,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
                 NSString *card_city = [self textAtColumn:46 statement:statement];
                 NSString *card_state = [self textAtColumn:47 statement:statement];
                 
+                payment = [self replaceHtml:payment String:@"Payment_Type" withString:nspayment_type];
                 payment = [self replaceHtml:payment String:@"CardNumber_or_nbsp" withString:card_number];
                 payment = [self replaceHtml:payment String:@"CardType_or_nbsp" withString:card_type];
                 payment = [self replaceHtml:payment String:@"CardExpireDate_or_nbsp" withString:card_expiration];
@@ -10652,197 +10653,372 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
         required = @"false";
     }
     
+    __block NSMutableDictionary *cadedate = [NSMutableDictionary dictionary];
+    // create table if not exists payment_type (_id integer primary key,type_id text,pay_type text,sort int);
+    NSString *pay_type_sql = @"select type_id,pay_type,sort_id from payment_type order by sort_id asc";
+    [iSalesDB jk_query:pay_type_sql db:db close:NO completion:^(sqlite3_stmt *stmt, NSMutableDictionary *container, long *count) {
+        
+        NSString *type_id = [self textAtColumn:0 statement:stmt];
+        NSString *type = [self textAtColumn:1 statement:stmt];
+        
+        NSMutableDictionary *val = @{
+                              @"check" : [payType isEqualToString:type_id] ? @(1) : @(0),
+                              @"value" : type,
+                              @"value_id" : type_id
+                              }.mutableCopy;
+        
+        if ([type_id isEqualToString:@"Visa/Master"] || [type_id isEqualToString:@"Credit Card"]) {
+            NSDictionary *sub_item = @{
+                                       @"count" : @(3),
+                                       @"item_0" : @{
+                                               @"aname" : @"choose",
+                                               @"control" : @"multi_action",
+                                               @"count" : @(1),
+                                               @"item_0" : @{
+                                                       @"aname" : @"Same as customer",
+                                                       @"key_map" : @{
+                                                               @"credit_card_address1" : @"customer_address1",
+                                                               @"credit_card_address2" : @"customer_address2",
+                                                               @"credit_card_city" : @"customer_city",
+                                                               @"credit_card_first_name" : @"customer_first_name",
+                                                               @"credit_card_last_name" : @"customer_last_name",
+                                                               @"credit_card_state" : @"customer_state",
+                                                               @"credit_card_zipcode" : @"customer_zipcode"
+                                                               },
+                                                       @"type" : @"pull"
+                                                       }
+                                               },
+                                       @"item_1" : @{
+                                               @"aname" : @"",
+                                               @"color" : @"red",
+                                               @"control" : @"text",
+                                               @"name" : @"",
+                                               @"value" : @"USA Credit cards only"
+                                               },
+                                       @"item_2" : @{
+                                               @"aname" : @"Fill",
+                                               @"cadedate" : @{
+                                                       @"count" : @(2),
+                                                       @"val_0" : @{
+                                                               @"check" : @(1),
+                                                               @"sub_item" : @{
+                                                                       @"count" : @(11),
+                                                                       @"item_0" : @{
+                                                                               @"aname" : @"Type",
+                                                                               @"cadedate" : @{
+                                                                                       @"count" : @(2),
+                                                                                       @"val_0" : @{
+                                                                                               @"check" : [cardType isEqualToString:@"VISA"] ? @(1) : @(0),
+                                                                                               @"value" : @"VISA",
+                                                                                               @"value_id" : @"VISA"/*@(0)*/
+                                                                                               },
+                                                                                       @"val_1" : @{
+                                                                                               @"check" : [cardType isEqualToString:@"MASTER CARD"] ? @(1) : @(0),
+                                                                                               @"value" : @"MASTER CARD",
+                                                                                               @"value_id" : @"MASTER CARD"/*@(1)*/
+                                                                                               }
+                                                                                       },
+                                                                               @"control" : @"enum",
+                                                                               @"name" : @"credit_card_type",
+                                                                               @"required" : @"true",
+                                                                               @"single_select" : @"true"
+                                                                               },
+                                                                       @"item_1" : @{
+                                                                               @"aname" : @"Number",
+                                                                               @"control" : @"edit",
+                                                                               @"keyboard" : @"int",
+                                                                               @"length" : @"16",
+                                                                               @"name" : @"credit_card_number",
+                                                                               @"required" : @"true",
+                                                                               @"value" : cardNumber
+                                                                               },
+                                                                       @"item_10" : @{
+                                                                               @"aname" : @"State",
+                                                                               @"cadedate" : [self offline_getStateByCountryCode:@"US" checkedState:state db:db],
+                                                                               @"control" : @"enum",
+                                                                               @"enum" : @"true",
+                                                                               @"name" : @"credit_card_state",
+                                                                               @"required" : @"true",
+                                                                               @"single_select" : @"true"
+                                                                               },
+                                                                       @"item_2" : @{
+                                                                               @"aname" : @"Expiration Date",
+                                                                               @"control" : @"monthpicker",
+                                                                               @"name" : @"credit_card_expiration",
+                                                                               @"required" : @"true",
+                                                                               @"type" : @"date",
+                                                                               @"value" : [month isEqualToString:@""] || [year isEqualToString:@""] ? @"" : [NSString stringWithFormat:@"%@/%@",month,year]
+                                                                               },
+                                                                       @"item_3" : @{
+                                                                               @"aname" : @"Security Code",
+                                                                               @"control" : @"edit",
+                                                                               @"keyboard" : @"int",
+                                                                               @"length" : @"3",
+                                                                               @"name" : @"credit_card_security_code",
+                                                                               @"required" : @"true",
+                                                                               @"value" : securityCode
+                                                                               },
+                                                                       @"item_4" : @{
+                                                                               @"aname" : @"First Name",
+                                                                               @"control" : @"edit",
+                                                                               @"keyboard" : @"text",
+                                                                               @"name" : @"credit_card_first_name",
+                                                                               @"required" : @"true",
+                                                                               @"value" : firstName
+                                                                               },
+                                                                       @"item_5" : @{
+                                                                               @"aname" : @"Last Name",
+                                                                               @"control" : @"edit",
+                                                                               @"keyboard" : @"text",
+                                                                               @"name" : @"credit_card_last_name",
+                                                                               @"required" : @"true",
+                                                                               @"value" : lastName
+                                                                               },
+                                                                       @"item_6" : @{
+                                                                               @"aname" : @"Address 1",
+                                                                               @"control" : @"edit",
+                                                                               @"keyboard" : @"text",
+                                                                               @"name" : @"credit_card_address1",
+                                                                               @"required" : @"true",
+                                                                               @"value" : addr1
+                                                                               },
+                                                                       @"item_7" : @{
+                                                                               @"aname" : @"Address 2",
+                                                                               @"control" : @"edit",
+                                                                               @"keyboard" : @"text",
+                                                                               @"name" : @"credit_card_address2",
+                                                                               @"value" : addr2
+                                                                               },
+                                                                       @"item_8" : @{
+                                                                               @"aname" : @"zip code",
+                                                                               @"control" : @"edit",
+                                                                               @"keyboard" : @"text",
+                                                                               @"name" : @"credit_card_zipcode",
+                                                                               @"required" : @"true",
+                                                                               @"value" : zipcode
+                                                                               },
+                                                                       @"item_9" : @{
+                                                                               @"aname" : @"City",
+                                                                               @"control" : @"edit",
+                                                                               @"keyboard" : @"text",
+                                                                               @"name" : @"credit_card_city",
+                                                                               @"required" : @"true",
+                                                                               @"value" : city
+                                                                               }
+                                                                       },
+                                                               @"value" : @"Fill Now",
+                                                               @"value_id" : @""
+                                                               },
+                                                       @"val_1" : @{
+                                                               @"check" : @(0),
+                                                               @"value" : @"Fill Later",
+                                                               @"value_id" : @""
+                                                               }
+                                                       },
+                                               @"control" : @"enum",
+                                               @"name" : @"",
+                                               @"single_select" : @"true"
+                                               }
+                                       };
+            [val setObject:sub_item forKey:@"sub_item"];
+        }
+        
+        [cadedate setObject:val forKey:[NSString stringWithFormat:@"val_%ld",(*count)]];
+        [cadedate setObject:[NSNumber numberWithInteger:(++*count)] forKey:@"count"];
+    }];
+    
     // "section_2"
     NSMutableDictionary *dic = @{
         @"count" : @(1),
         @"item_0" : @{
             @"aname" : @"Payment",
             @"required" : required,
-            @"cadedate" : @{
-                @"count" : @(6),
-                @"val_3" : @{
-                    @"check" : [payType isEqualToString:@"Check"] ? @(1) : @(0),
-                    @"value" : @"Check",
-                    @"value_id" : @"Check"
-                },
-                @"val_2" : @{
-                    @"check" : [payType isEqualToString:@"Cash"] ? @(1) : @(0),
-                    @"value" : @"Cash",
-                    @"value_id" : @"Cash"
-                },
-                @"val_1" : @{
-                    @"check" : [payType isEqualToString:@"NET 30"] ? @(1) : @(0),
-                    @"value" : @"NET 60",
-                    @"value_id" : @"NET 30"
-                },
-                @"val_4" : @{
-                    @"check" : [payType isEqualToString:@"Wire Transfer"] ? @(1) : @(0),
-                    @"value" : @"Wire Transfer",
-                    @"value_id" : @"Wire Transfer"
-                },
-                @"val_0" : @{
-                    @"check" : [payType isEqualToString:@"Credit Card"] ? @(1) : @(0),
-                    @"sub_item" : @{
-                        @"count" : @(3),
-                        @"item_0" : @{
-                            @"aname" : @"choose",
-                            @"control" : @"multi_action",
-                            @"count" : @(1),
-                            @"item_0" : @{
-                                @"aname" : @"Same as customer",
-                                @"key_map" : @{
-                                    @"credit_card_address1" : @"customer_address1",
-                                    @"credit_card_address2" : @"customer_address2",
-                                    @"credit_card_city" : @"customer_city",
-                                    @"credit_card_first_name" : @"customer_first_name",
-                                    @"credit_card_last_name" : @"customer_last_name",
-                                    @"credit_card_state" : @"customer_state",
-                                    @"credit_card_zipcode" : @"customer_zipcode"
-                                },
-                                @"type" : @"pull"
-                            }
-                        },
-                        @"item_1" : @{
-                            @"aname" : @"",
-                            @"color" : @"red",
-                            @"control" : @"text",
-                            @"name" : @"",
-                            @"value" : @"USA Credit cards only"
-                        },
-                        @"item_2" : @{
-                            @"aname" : @"Fill",
-                            @"cadedate" : @{
-                                @"count" : @(2),
-                                @"val_0" : @{
-                                    @"check" : @(1),
-                                    @"sub_item" : @{
-                                        @"count" : @(11),
-                                        @"item_0" : @{
-                                            @"aname" : @"Type",
-                                            @"cadedate" : @{
-                                                @"count" : @(2),
-                                                @"val_0" : @{
-                                                        @"check" : [cardType isEqualToString:@"VISA"] ? @(1) : @(0),
-                                                    @"value" : @"VISA",
-                                                    @"value_id" : @(0)
-                                                },
-                                                @"val_1" : @{
-                                                    @"check" : [cardType isEqualToString:@"MASTER CARD"] ? @(1) : @(0),
-                                                    @"value" : @"MASTER CARD",
-                                                    @"value_id" : @(1)
-                                                }
-                                            },
-                                            @"control" : @"enum",
-                                            @"name" : @"credit_card_type",
-                                            @"required" : @"true",
-                                            @"single_select" : @"true"
-                                        },
-                                        @"item_1" : @{
-                                            @"aname" : @"Number",
-                                            @"control" : @"edit",
-                                            @"keyboard" : @"int",
-                                            @"length" : @"16",
-                                            @"name" : @"credit_card_number",
-                                            @"required" : @"true",
-                                            @"value" : cardNumber
-                                        },
-                                        @"item_10" : @{
-                                            @"aname" : @"State",
-                                            @"cadedate" : [self offline_getStateByCountryCode:@"US" checkedState:state db:db],
-                                            @"control" : @"enum",
-                                            @"enum" : @"true",
-                                            @"name" : @"credit_card_state",
-                                            @"required" : @"true",
-                                            @"single_select" : @"true"
-                                        },
-                                        @"item_2" : @{
-                                            @"aname" : @"Expiration Date",
-                                            @"control" : @"monthpicker",
-                                            @"name" : @"credit_card_expiration",
-                                            @"required" : @"true",
-                                            @"type" : @"date",
-                                            @"value" : [month isEqualToString:@""] || [year isEqualToString:@""] ? @"" : [NSString stringWithFormat:@"%@/%@",month,year]
-                                        },
-                                        @"item_3" : @{
-                                            @"aname" : @"Security Code",
-                                            @"control" : @"edit",
-                                            @"keyboard" : @"int",
-                                            @"length" : @"3",
-                                            @"name" : @"credit_card_security_code",
-                                            @"required" : @"true",
-                                            @"value" : securityCode
-                                        },
-                                        @"item_4" : @{
-                                            @"aname" : @"First Name",
-                                            @"control" : @"edit",
-                                            @"keyboard" : @"text",
-                                            @"name" : @"credit_card_first_name",
-                                            @"required" : @"true",
-                                            @"value" : firstName
-                                        },
-                                        @"item_5" : @{
-                                            @"aname" : @"Last Name",
-                                            @"control" : @"edit",
-                                            @"keyboard" : @"text",
-                                            @"name" : @"credit_card_last_name",
-                                            @"required" : @"true",
-                                            @"value" : lastName
-                                        },
-                                        @"item_6" : @{
-                                            @"aname" : @"Address 1",
-                                            @"control" : @"edit",
-                                            @"keyboard" : @"text",
-                                            @"name" : @"credit_card_address1",
-                                            @"required" : @"true",
-                                            @"value" : addr1
-                                        },
-                                        @"item_7" : @{
-                                            @"aname" : @"Address 2",
-                                            @"control" : @"edit",
-                                            @"keyboard" : @"text",
-                                            @"name" : @"credit_card_address2",
-                                            @"value" : addr2
-                                        },
-                                        @"item_8" : @{
-                                            @"aname" : @"zip code",
-                                            @"control" : @"edit",
-                                            @"keyboard" : @"text",
-                                            @"name" : @"credit_card_zipcode",
-                                            @"required" : @"true",
-                                            @"value" : zipcode
-                                        },
-                                        @"item_9" : @{
-                                            @"aname" : @"City",
-                                            @"control" : @"edit",
-                                            @"keyboard" : @"text",
-                                            @"name" : @"credit_card_city",
-                                            @"required" : @"true",
-                                            @"value" : city
-                                        }
-                                    },
-                                    @"value" : @"Fill Now",
-                                    @"value_id" : @""
-                                },
-                                @"val_1" : @{
-                                    @"check" : @(0),
-                                    @"value" : @"Fill Later",
-                                    @"value_id" : @""
-                                }
-                            },
-                            @"control" : @"enum",
-                            @"name" : @"",
-                            @"single_select" : @"true"
-                        }
-                    },
-                    @"value" : @"Visa/Master",
-                    @"value_id" : @"Credit Card"
-                },
-                @"val_5" : @{
-                        @"check" : [payType isEqualToString:@"FOLLOW EXISTING"] ? @(1) : @(0),
-                    @"value" : @"FOLLOW EXISTING PAYMENT TYPE",
-                    @"value_id" : @"FOLLOW EXISTING"
-                }
-            },
+            @"cadedate" : cadedate,
+//            @{
+//                @"count" : @(6),
+//                @"val_3" : @{
+//                    @"check" : [payType isEqualToString:@"Check"] ? @(1) : @(0),
+//                    @"value" : @"Check",
+//                    @"value_id" : @"Check"
+//                },
+//                @"val_2" : @{
+//                    @"check" : [payType isEqualToString:@"Cash"] ? @(1) : @(0),
+//                    @"value" : @"Cash",
+//                    @"value_id" : @"Cash"
+//                },
+//                @"val_1" : @{
+//                    @"check" : [payType isEqualToString:@"NET 30"] ? @(1) : @(0),
+//                    @"value" : @"NET 60",
+//                    @"value_id" : @"NET 30"
+//                },
+//                @"val_4" : @{
+//                    @"check" : [payType isEqualToString:@"Wire Transfer"] ? @(1) : @(0),
+//                    @"value" : @"Wire Transfer",
+//                    @"value_id" : @"Wire Transfer"
+//                },
+//                @"val_0" : @{
+//                    @"check" : [payType isEqualToString:@"Credit Card"] ? @(1) : @(0),
+//                    @"sub_item" : @{
+//                        @"count" : @(3),
+//                        @"item_0" : @{
+//                            @"aname" : @"choose",
+//                            @"control" : @"multi_action",
+//                            @"count" : @(1),
+//                            @"item_0" : @{
+//                                @"aname" : @"Same as customer",
+//                                @"key_map" : @{
+//                                    @"credit_card_address1" : @"customer_address1",
+//                                    @"credit_card_address2" : @"customer_address2",
+//                                    @"credit_card_city" : @"customer_city",
+//                                    @"credit_card_first_name" : @"customer_first_name",
+//                                    @"credit_card_last_name" : @"customer_last_name",
+//                                    @"credit_card_state" : @"customer_state",
+//                                    @"credit_card_zipcode" : @"customer_zipcode"
+//                                },
+//                                @"type" : @"pull"
+//                            }
+//                        },
+//                        @"item_1" : @{
+//                            @"aname" : @"",
+//                            @"color" : @"red",
+//                            @"control" : @"text",
+//                            @"name" : @"",
+//                            @"value" : @"USA Credit cards only"
+//                        },
+//                        @"item_2" : @{
+//                            @"aname" : @"Fill",
+//                            @"cadedate" : @{
+//                                @"count" : @(2),
+//                                @"val_0" : @{
+//                                    @"check" : @(1),
+//                                    @"sub_item" : @{
+//                                        @"count" : @(11),
+//                                        @"item_0" : @{
+//                                            @"aname" : @"Type",
+//                                            @"cadedate" : @{
+//                                                @"count" : @(2),
+//                                                @"val_0" : @{
+//                                                        @"check" : [cardType isEqualToString:@"VISA"] ? @(1) : @(0),
+//                                                    @"value" : @"VISA",
+//                                                    @"value_id" : @(0)
+//                                                },
+//                                                @"val_1" : @{
+//                                                    @"check" : [cardType isEqualToString:@"MASTER CARD"] ? @(1) : @(0),
+//                                                    @"value" : @"MASTER CARD",
+//                                                    @"value_id" : @(1)
+//                                                }
+//                                            },
+//                                            @"control" : @"enum",
+//                                            @"name" : @"credit_card_type",
+//                                            @"required" : @"true",
+//                                            @"single_select" : @"true"
+//                                        },
+//                                        @"item_1" : @{
+//                                            @"aname" : @"Number",
+//                                            @"control" : @"edit",
+//                                            @"keyboard" : @"int",
+//                                            @"length" : @"16",
+//                                            @"name" : @"credit_card_number",
+//                                            @"required" : @"true",
+//                                            @"value" : cardNumber
+//                                        },
+//                                        @"item_10" : @{
+//                                            @"aname" : @"State",
+//                                            @"cadedate" : [self offline_getStateByCountryCode:@"US" checkedState:state db:db],
+//                                            @"control" : @"enum",
+//                                            @"enum" : @"true",
+//                                            @"name" : @"credit_card_state",
+//                                            @"required" : @"true",
+//                                            @"single_select" : @"true"
+//                                        },
+//                                        @"item_2" : @{
+//                                            @"aname" : @"Expiration Date",
+//                                            @"control" : @"monthpicker",
+//                                            @"name" : @"credit_card_expiration",
+//                                            @"required" : @"true",
+//                                            @"type" : @"date",
+//                                            @"value" : [month isEqualToString:@""] || [year isEqualToString:@""] ? @"" : [NSString stringWithFormat:@"%@/%@",month,year]
+//                                        },
+//                                        @"item_3" : @{
+//                                            @"aname" : @"Security Code",
+//                                            @"control" : @"edit",
+//                                            @"keyboard" : @"int",
+//                                            @"length" : @"3",
+//                                            @"name" : @"credit_card_security_code",
+//                                            @"required" : @"true",
+//                                            @"value" : securityCode
+//                                        },
+//                                        @"item_4" : @{
+//                                            @"aname" : @"First Name",
+//                                            @"control" : @"edit",
+//                                            @"keyboard" : @"text",
+//                                            @"name" : @"credit_card_first_name",
+//                                            @"required" : @"true",
+//                                            @"value" : firstName
+//                                        },
+//                                        @"item_5" : @{
+//                                            @"aname" : @"Last Name",
+//                                            @"control" : @"edit",
+//                                            @"keyboard" : @"text",
+//                                            @"name" : @"credit_card_last_name",
+//                                            @"required" : @"true",
+//                                            @"value" : lastName
+//                                        },
+//                                        @"item_6" : @{
+//                                            @"aname" : @"Address 1",
+//                                            @"control" : @"edit",
+//                                            @"keyboard" : @"text",
+//                                            @"name" : @"credit_card_address1",
+//                                            @"required" : @"true",
+//                                            @"value" : addr1
+//                                        },
+//                                        @"item_7" : @{
+//                                            @"aname" : @"Address 2",
+//                                            @"control" : @"edit",
+//                                            @"keyboard" : @"text",
+//                                            @"name" : @"credit_card_address2",
+//                                            @"value" : addr2
+//                                        },
+//                                        @"item_8" : @{
+//                                            @"aname" : @"zip code",
+//                                            @"control" : @"edit",
+//                                            @"keyboard" : @"text",
+//                                            @"name" : @"credit_card_zipcode",
+//                                            @"required" : @"true",
+//                                            @"value" : zipcode
+//                                        },
+//                                        @"item_9" : @{
+//                                            @"aname" : @"City",
+//                                            @"control" : @"edit",
+//                                            @"keyboard" : @"text",
+//                                            @"name" : @"credit_card_city",
+//                                            @"required" : @"true",
+//                                            @"value" : city
+//                                        }
+//                                    },
+//                                    @"value" : @"Fill Now",
+//                                    @"value_id" : @""
+//                                },
+//                                @"val_1" : @{
+//                                    @"check" : @(0),
+//                                    @"value" : @"Fill Later",
+//                                    @"value_id" : @""
+//                                }
+//                            },
+//                            @"control" : @"enum",
+//                            @"name" : @"",
+//                            @"single_select" : @"true"
+//                        }
+//                    },
+//                    @"value" : @"Visa/Master",
+//                    @"value_id" : @"Credit Card"
+//                },
+//                @"val_5" : @{
+//                        @"check" : [payType isEqualToString:@"FOLLOW EXISTING"] ? @(1) : @(0),
+//                    @"value" : @"FOLLOW EXISTING PAYMENT TYPE",
+//                    @"value_id" : @"FOLLOW EXISTING"
+//                }
+//            },
             @"control" : @"enum",
             @"name" : @"paymentType",
             @"single_select" : @"true"

+ 2 - 2
RedAnt ERP Mobile/common/Functions/offline/creditcardpayment.html

@@ -1,4 +1,4 @@
-<div style='margin-left:15px;word-wrap:break-word;word-break:break-all;'>Payment: Credit Card<br><p><b style='font-size:16px;'>Card information</b></p>
+<div style='margin-left:15px;word-wrap:break-word;word-break:break-all;'>Payment: Payment_Type<br><p><b style='font-size:16px;'>Card information</b></p>
     <div style='width:50%;float:left;'>Card number:</div>
     <div style='width:50%;float:left;'>CardNumber_or_nbsp</div>
     <div style='width:50%;float:left;'>Card type:</div>
@@ -20,4 +20,4 @@
     <div style='width:50%;float:left;'>BillingState_or_nbsp</div>
     <div style='width:50%;float:left;'>Zip code:</div>
     <div style='width:50%;float:left;'>BillingZipCode_or_nbsp</div>
-</div>
+</div>

+ 5 - 2
RedAnt ERP Mobile/common/data_provider/iSalesDB.m

@@ -731,7 +731,9 @@ void decryptfield (sqlite3_context *context, int argc, sqlite3_value **argv) {
     NSString *create_offline_pdf = @"create table if not exists offline_pdf (_id integer primary key,tearsheets_id integer,pdf_path text,create_user text,tear_note text,tear_name text,model_info text,configureParams text,is_delete integer,is_dirty integer,is_local integer,off_params text,createtime timestamp default(datetime('now','localtime')),modify_time timestamp DEFAULT(datetime('now','localtime')));";
     
     NSString *create_contact_type = @"create table if not exists contact_type (_id integer primary key,type_name text,is_show integer,create_time TIMESTAMP DEFAULT(datetime('now','localtime')),modify_time TIMESTAMP DEFAULT(datetime('now','localtime')));";
-    
+
+    NSString *create_payment_type = @"create table if not exists payment_type (_id integer primary key,type_id text,pay_type text,sort_id int);";
+
     
     NSString* create_order_trigger=@"CREATE TRIGGER  if not exists offline_order_insert after insert on offline_order BEGIN select offline_dirty();  UPDATE offline_order SET modify_time= datetime('now', 'localtime') WHERE _id=new._id;END;CREATE TRIGGER  if not exists offline_order_update after update on offline_order BEGIN select offline_dirty();  UPDATE offline_order SET modify_time= datetime('now', 'localtime') WHERE _id=new._id;END;CREATE TRIGGER  if not exists offline_order_delete after delete on offline_order BEGIN select offline_dirty();  END;";
  
@@ -791,7 +793,8 @@ void decryptfield (sqlite3_context *context, int argc, sqlite3_value **argv) {
 
         [self execSql:create_contact_type db:db];
         
-        
+        // v1.90
+        [self execSql:create_payment_type db:db];
     }
     
     [self execSql:create_login_info db:db];