|
@@ -10911,121 +10911,193 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
|
|
|
|
|
|
|
|
|
|
|
|
|
NSString *receive_cid = [self valueInParams:param key:@"receive_cid" translateSingleQuote:YES];
|
|
NSString *receive_cid = [self valueInParams:param key:@"receive_cid" translateSingleQuote:YES];
|
|
|
- receive_cid = [NSString stringWithFormat:@"receive_cid = '%@',",receive_cid];
|
|
|
|
|
|
|
+ if (receive_cid.length) {
|
|
|
|
|
+ receive_cid = [NSString stringWithFormat:@"receive_cid = '%@',",receive_cid];
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
NSString *receive_name = [self valueInParams:param key:@"receive_name" translateSingleQuote:YES];
|
|
NSString *receive_name = [self valueInParams:param key:@"receive_name" translateSingleQuote:YES];
|
|
|
- receive_name = [NSString stringWithFormat:@"receive_name = '%@',",receive_name];
|
|
|
|
|
|
|
+ if (receive_name.length) {
|
|
|
|
|
+ receive_name = [NSString stringWithFormat:@"receive_name = '%@',",receive_name];
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
|
NSString *receive_ext = [self valueInParams:param key:@"receive_ext" translateSingleQuote:YES];
|
|
NSString *receive_ext = [self valueInParams:param key:@"receive_ext" translateSingleQuote:YES];
|
|
|
- receive_ext = [NSString stringWithFormat:@"receive_ext = '%@',",receive_ext];
|
|
|
|
|
|
|
+ if (receive_ext.length) {
|
|
|
|
|
+ receive_ext = [NSString stringWithFormat:@"receive_ext = '%@',",receive_ext];
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
|
NSString *receive_contact = [self valueInParams:param key:@"receive_contact" translateSingleQuote:YES];
|
|
NSString *receive_contact = [self valueInParams:param key:@"receive_contact" translateSingleQuote:YES];
|
|
|
- receive_contact = [NSString stringWithFormat:@"receive_contact = '%@',",receive_contact];
|
|
|
|
|
|
|
+ if (receive_contact.length) {
|
|
|
|
|
+ receive_contact = [NSString stringWithFormat:@"receive_contact = '%@',",receive_contact];
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
|
NSString *receive_phone = [self valueInParams:param key:@"receive_phone" translateSingleQuote:YES];
|
|
NSString *receive_phone = [self valueInParams:param key:@"receive_phone" translateSingleQuote:YES];
|
|
|
- receive_phone = [NSString stringWithFormat:@"receive_phone = '%@',",receive_phone];
|
|
|
|
|
|
|
+ if (receive_phone.length) {
|
|
|
|
|
+ receive_phone = [NSString stringWithFormat:@"receive_phone = '%@',",receive_phone];
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
|
NSString *receive_email = [self valueInParams:param key:@"receive_email" translateSingleQuote:YES];
|
|
NSString *receive_email = [self valueInParams:param key:@"receive_email" translateSingleQuote:YES];
|
|
|
- receive_email = [NSString stringWithFormat:@"receive_email = '%@',",receive_email];
|
|
|
|
|
|
|
+ if (receive_email.length) {
|
|
|
|
|
+ receive_email = [NSString stringWithFormat:@"receive_email = '%@',",receive_email];
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
|
NSString *receive_fax = [self valueInParams:param key:@"receive_fax" translateSingleQuote:YES];
|
|
NSString *receive_fax = [self valueInParams:param key:@"receive_fax" translateSingleQuote:YES];
|
|
|
- receive_fax = [NSString stringWithFormat:@"receive_fax = '%@',",receive_fax];
|
|
|
|
|
|
|
+ if (receive_fax.length) {
|
|
|
|
|
+ receive_fax = [NSString stringWithFormat:@"receive_fax = '%@',",receive_fax];
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NSString *sender_cid = [self valueInParams:param key:@"sender_cid" translateSingleQuote:YES];
|
|
NSString *sender_cid = [self valueInParams:param key:@"sender_cid" translateSingleQuote:YES];
|
|
|
- sender_cid = [NSString stringWithFormat:@"sender_cid = '%@',",sender_cid];
|
|
|
|
|
|
|
+ if (sender_cid.length) {
|
|
|
|
|
+ sender_cid = [NSString stringWithFormat:@"sender_cid = '%@',",sender_cid];
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
NSString *sender_name = [self valueInParams:param key:@"sender_name" translateSingleQuote:YES];
|
|
NSString *sender_name = [self valueInParams:param key:@"sender_name" translateSingleQuote:YES];
|
|
|
- sender_name = [NSString stringWithFormat:@"sender_name = '%@',",sender_name];
|
|
|
|
|
|
|
+ if (sender_name.length) {
|
|
|
|
|
+ sender_name = [NSString stringWithFormat:@"sender_name = '%@',",sender_name];
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
NSString *sender_ext = [self valueInParams:param key:@"sender_ext" translateSingleQuote:YES];
|
|
NSString *sender_ext = [self valueInParams:param key:@"sender_ext" translateSingleQuote:YES];
|
|
|
- sender_ext = [NSString stringWithFormat:@"sender_ext = '%@',",sender_ext];
|
|
|
|
|
|
|
+ if (sender_ext.length) {
|
|
|
|
|
+ sender_ext = [NSString stringWithFormat:@"sender_ext = '%@',",sender_ext];
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
NSString *sender_contact = [self valueInParams:param key:@"sender_contact" translateSingleQuote:YES];
|
|
NSString *sender_contact = [self valueInParams:param key:@"sender_contact" translateSingleQuote:YES];
|
|
|
- sender_contact = [NSString stringWithFormat:@"sender_contact = '%@',",sender_contact];
|
|
|
|
|
|
|
+ if(sender_contact.length) {
|
|
|
|
|
+ sender_contact = [NSString stringWithFormat:@"sender_contact = '%@',",sender_contact];
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
NSString *sender_phone = [self valueInParams:param key:@"sender_phone" translateSingleQuote:YES];
|
|
NSString *sender_phone = [self valueInParams:param key:@"sender_phone" translateSingleQuote:YES];
|
|
|
- sender_phone = [NSString stringWithFormat:@"sender_phone = '%@',",sender_phone];
|
|
|
|
|
|
|
+ if (sender_phone.length) {
|
|
|
|
|
+ sender_phone = [NSString stringWithFormat:@"sender_phone = '%@',",sender_phone];
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
NSString *sender_fax = [self valueInParams:param key:@"sender_fax" translateSingleQuote:YES];
|
|
NSString *sender_fax = [self valueInParams:param key:@"sender_fax" translateSingleQuote:YES];
|
|
|
- sender_fax = [NSString stringWithFormat:@"sender_fax = '%@',",sender_fax];
|
|
|
|
|
|
|
+ if (sender_fax.length) {
|
|
|
|
|
+ sender_fax = [NSString stringWithFormat:@"sender_fax = '%@',",sender_fax];
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
NSString *sender_email = [self valueInParams:param key:@"sender_email" translateSingleQuote:YES];
|
|
NSString *sender_email = [self valueInParams:param key:@"sender_email" translateSingleQuote:YES];
|
|
|
- sender_email = [NSString stringWithFormat:@"sender_email = '%@',",sender_email];
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+ if (sender_email.length) {
|
|
|
|
|
+ sender_email = [NSString stringWithFormat:@"sender_email = '%@',",sender_email];
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
NSString *shipping_billto_cid = [self valueInParams:param key:@"shipping_billto_cid" translateSingleQuote:YES];
|
|
NSString *shipping_billto_cid = [self valueInParams:param key:@"shipping_billto_cid" translateSingleQuote:YES];
|
|
|
- shipping_billto_cid = [NSString stringWithFormat:@"shipping_billto_cid = '%@',",shipping_billto_cid];
|
|
|
|
|
|
|
+ if (shipping_billto_cid.length) {
|
|
|
|
|
+ shipping_billto_cid = [NSString stringWithFormat:@"shipping_billto_cid = '%@',",shipping_billto_cid];
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
NSString *shipping_billto_name = [self valueInParams:param key:@"shipping_billto_name" translateSingleQuote:YES];
|
|
NSString *shipping_billto_name = [self valueInParams:param key:@"shipping_billto_name" translateSingleQuote:YES];
|
|
|
- shipping_billto_name = [NSString stringWithFormat:@"shipping_billto_name = '%@',",shipping_billto_name];
|
|
|
|
|
|
|
+ if (shipping_billto_name.length) {
|
|
|
|
|
+ shipping_billto_name = [NSString stringWithFormat:@"shipping_billto_name = '%@',",shipping_billto_name];
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
NSString *shipping_billto_ext = [self valueInParams:param key:@"shipping_billto_ext" translateSingleQuote:YES];
|
|
NSString *shipping_billto_ext = [self valueInParams:param key:@"shipping_billto_ext" translateSingleQuote:YES];
|
|
|
- shipping_billto_ext = [NSString stringWithFormat:@"shipping_billto_ext = '%@',",shipping_billto_ext];
|
|
|
|
|
|
|
+ if (shipping_billto_ext.length) {
|
|
|
|
|
+ shipping_billto_ext = [NSString stringWithFormat:@"shipping_billto_ext = '%@',",shipping_billto_ext];
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
NSString *shipping_billto_contact = [self valueInParams:param key:@"shipping_billto_contact" translateSingleQuote:YES];
|
|
NSString *shipping_billto_contact = [self valueInParams:param key:@"shipping_billto_contact" translateSingleQuote:YES];
|
|
|
- shipping_billto_contact = [NSString stringWithFormat:@"shipping_billto_contact = '%@',",shipping_billto_contact];
|
|
|
|
|
|
|
+ if (shipping_billto_contact.length) {
|
|
|
|
|
+ shipping_billto_contact = [NSString stringWithFormat:@"shipping_billto_contact = '%@',",shipping_billto_contact];
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
NSString *shipping_billto_phone = [self valueInParams:param key:@"shipping_billto_phone" translateSingleQuote:YES];
|
|
NSString *shipping_billto_phone = [self valueInParams:param key:@"shipping_billto_phone" translateSingleQuote:YES];
|
|
|
- shipping_billto_phone = [NSString stringWithFormat:@"shipping_billto_phone = '%@',",shipping_billto_phone];
|
|
|
|
|
|
|
+ if (shipping_billto_phone.length) {
|
|
|
|
|
+ shipping_billto_phone = [NSString stringWithFormat:@"shipping_billto_phone = '%@',",shipping_billto_phone];
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
NSString *shipping_billto_fax = [self valueInParams:param key:@"shipping_billto_fax" translateSingleQuote:YES];
|
|
NSString *shipping_billto_fax = [self valueInParams:param key:@"shipping_billto_fax" translateSingleQuote:YES];
|
|
|
- shipping_billto_fax = [NSString stringWithFormat:@"shipping_billto_fax = '%@',",shipping_billto_fax];
|
|
|
|
|
|
|
+ if (shipping_billto_fax.length) {
|
|
|
|
|
+ shipping_billto_fax = [NSString stringWithFormat:@"shipping_billto_fax = '%@',",shipping_billto_fax];
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
NSString *shipping_billto_email = [self valueInParams:param key:@"shipping_billto_email" translateSingleQuote:YES];
|
|
NSString *shipping_billto_email = [self valueInParams:param key:@"shipping_billto_email" translateSingleQuote:YES];
|
|
|
- shipping_billto_email = [NSString stringWithFormat:@"shipping_billto_email = '%@',",shipping_billto_email];
|
|
|
|
|
|
|
+ if (shipping_billto_email.length) {
|
|
|
|
|
+ shipping_billto_email = [NSString stringWithFormat:@"shipping_billto_email = '%@',",shipping_billto_email];
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
|
NSString *billing_cid = [self valueInParams:param key:@"billing_cid" translateSingleQuote:YES];
|
|
NSString *billing_cid = [self valueInParams:param key:@"billing_cid" translateSingleQuote:YES];
|
|
|
- billing_cid = [NSString stringWithFormat:@"billing_cid = '%@',",billing_cid];
|
|
|
|
|
|
|
+ if (billing_cid.length) {
|
|
|
|
|
+ billing_cid = [NSString stringWithFormat:@"billing_cid = '%@',",billing_cid];
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
NSString *billing_name = [self valueInParams:param key:@"billing_name" translateSingleQuote:YES];
|
|
NSString *billing_name = [self valueInParams:param key:@"billing_name" translateSingleQuote:YES];
|
|
|
- billing_name = [NSString stringWithFormat:@"billing_name = '%@',",billing_name];
|
|
|
|
|
|
|
+ if (billing_name.length) {
|
|
|
|
|
+ billing_name = [NSString stringWithFormat:@"billing_name = '%@',",billing_name];
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
NSString *billing_ext = [self valueInParams:param key:@"billing_ext" translateSingleQuote:YES];
|
|
NSString *billing_ext = [self valueInParams:param key:@"billing_ext" translateSingleQuote:YES];
|
|
|
- billing_ext = [NSString stringWithFormat:@"billing_ext = '%@',",billing_ext];
|
|
|
|
|
|
|
+ if (billing_ext.length) {
|
|
|
|
|
+ billing_ext = [NSString stringWithFormat:@"billing_ext = '%@',",billing_ext];
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
NSString *billing_contact = [self valueInParams:param key:@"billing_contact" translateSingleQuote:YES];
|
|
NSString *billing_contact = [self valueInParams:param key:@"billing_contact" translateSingleQuote:YES];
|
|
|
- billing_contact = [NSString stringWithFormat:@"billing_contact = '%@',",billing_contact];
|
|
|
|
|
|
|
+ if (billing_contact.length) {
|
|
|
|
|
+ billing_contact = [NSString stringWithFormat:@"billing_contact = '%@',",billing_contact];
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
NSString *billing_phone = [self valueInParams:param key:@"billing_phone" translateSingleQuote:YES];
|
|
NSString *billing_phone = [self valueInParams:param key:@"billing_phone" translateSingleQuote:YES];
|
|
|
- billing_phone = [NSString stringWithFormat:@"billing_phone = '%@',",billing_phone];
|
|
|
|
|
|
|
+ if (billing_phone.length) {
|
|
|
|
|
+ billing_phone = [NSString stringWithFormat:@"billing_phone = '%@',",billing_phone];
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
NSString *billing_fax = [self valueInParams:param key:@"billing_fax" translateSingleQuote:YES];
|
|
NSString *billing_fax = [self valueInParams:param key:@"billing_fax" translateSingleQuote:YES];
|
|
|
- billing_fax = [NSString stringWithFormat:@"billing_fax = '%@',",billing_fax];
|
|
|
|
|
|
|
+ if (billing_fax.length) {
|
|
|
|
|
+ billing_fax = [NSString stringWithFormat:@"billing_fax = '%@',",billing_fax];
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
NSString *billing_email = [self valueInParams:param key:@"billing_email" translateSingleQuote:YES];
|
|
NSString *billing_email = [self valueInParams:param key:@"billing_email" translateSingleQuote:YES];
|
|
|
- billing_email = [NSString stringWithFormat:@"billing_email = '%@',",billing_email];
|
|
|
|
|
|
|
+ if (billing_email.length) {
|
|
|
|
|
+ billing_email = [NSString stringWithFormat:@"billing_email = '%@',",billing_email];
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
|
NSString *returnto_cid = [self valueInParams:param key:@"returnto_cid" translateSingleQuote:YES];
|
|
NSString *returnto_cid = [self valueInParams:param key:@"returnto_cid" translateSingleQuote:YES];
|
|
|
- returnto_cid = [NSString stringWithFormat:@"returnto_cid = '%@',",returnto_cid];
|
|
|
|
|
|
|
+ if (returnto_cid.length) {
|
|
|
|
|
+ returnto_cid = [NSString stringWithFormat:@"returnto_cid = '%@',",returnto_cid];
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
NSString *returnto_name = [self valueInParams:param key:@"returnto_name" translateSingleQuote:YES];
|
|
NSString *returnto_name = [self valueInParams:param key:@"returnto_name" translateSingleQuote:YES];
|
|
|
- returnto_name = [NSString stringWithFormat:@"returnto_name = '%@',",returnto_name];
|
|
|
|
|
|
|
+ if (returnto_name.length) {
|
|
|
|
|
+ returnto_name = [NSString stringWithFormat:@"returnto_name = '%@',",returnto_name];
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
NSString *returnto_ext = [self valueInParams:param key:@"returnto_ext" translateSingleQuote:YES];
|
|
NSString *returnto_ext = [self valueInParams:param key:@"returnto_ext" translateSingleQuote:YES];
|
|
|
- returnto_ext = [NSString stringWithFormat:@"returnto_ext = '%@',",returnto_ext];
|
|
|
|
|
|
|
+ if (returnto_ext.length) {
|
|
|
|
|
+ returnto_ext = [NSString stringWithFormat:@"returnto_ext = '%@',",returnto_ext];
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
NSString *returnto_contact = [self valueInParams:param key:@"returnto_contact" translateSingleQuote:YES];
|
|
NSString *returnto_contact = [self valueInParams:param key:@"returnto_contact" translateSingleQuote:YES];
|
|
|
- returnto_contact = [NSString stringWithFormat:@"returnto_contact = '%@',",returnto_contact];
|
|
|
|
|
|
|
+ if (returnto_contact.length) {
|
|
|
|
|
+ returnto_contact = [NSString stringWithFormat:@"returnto_contact = '%@',",returnto_contact];
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
NSString *returnto_phone = [self valueInParams:param key:@"returnto_phone" translateSingleQuote:YES];
|
|
NSString *returnto_phone = [self valueInParams:param key:@"returnto_phone" translateSingleQuote:YES];
|
|
|
- returnto_phone = [NSString stringWithFormat:@"returnto_phone = '%@',",returnto_phone];
|
|
|
|
|
|
|
+ if (returnto_phone.length) {
|
|
|
|
|
+ returnto_phone = [NSString stringWithFormat:@"returnto_phone = '%@',",returnto_phone];
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
NSString *returnto_fax = [self valueInParams:param key:@"returnto_fax" translateSingleQuote:YES];
|
|
NSString *returnto_fax = [self valueInParams:param key:@"returnto_fax" translateSingleQuote:YES];
|
|
|
- returnto_fax = [NSString stringWithFormat:@"returnto_fax = '%@',",returnto_fax];
|
|
|
|
|
|
|
+ if (returnto_fax.length) {
|
|
|
|
|
+ returnto_fax = [NSString stringWithFormat:@"returnto_fax = '%@',",returnto_fax];
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
NSString *returnto_email = [self valueInParams:param key:@"returnto_email" translateSingleQuote:YES];
|
|
NSString *returnto_email = [self valueInParams:param key:@"returnto_email" translateSingleQuote:YES];
|
|
|
- returnto_email = [NSString stringWithFormat:@"returnto_email = '%@',",returnto_email];
|
|
|
|
|
|
|
+ if (returnto_email.length) {
|
|
|
|
|
+ returnto_email = [NSString stringWithFormat:@"returnto_email = '%@',",returnto_email];
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
NSString *order_status = @"status = 1,";
|
|
NSString *order_status = @"status = 1,";
|
|
|
if (submit) {
|
|
if (submit) {
|