Ray Zhang %!s(int64=10) %!d(string=hai) anos
pai
achega
885c6c53cf

+ 7 - 3
RedAnt ERP Mobile/common/CommonEditor/CommonEditorViewController.m

@@ -3829,7 +3829,7 @@
                     int modulus= [[bitem valueForKey:@"modulus"] intValue];
                     citem+= modulus;
                     double uprice= [[bitem valueForKey:@"unit_price"]doubleValue];
-                    dprice+= uprice*modulus*count;
+                    dprice+= uprice*modulus;
                     
                 }
                 if(citem==1)
@@ -3862,8 +3862,12 @@
             
             
             NSString* oldprice =[NSString stringWithFormat:@"%.2f",unitprice];
-            NSString* newunitprice = [NSString stringWithFormat:@"%.2f",unitprice* (1.0-discount/100)];
-            NSString* totalprice = [NSString stringWithFormat:@"%.2f",unitprice* (1.0-discount/100)*count];
+            NSString* newunitprice=@"";
+            if(dprice>0)
+            newunitprice = [NSString stringWithFormat:@"%.2f+%.2f",unitprice* (1.0-discount/100),dprice];
+            else
+                newunitprice = [NSString stringWithFormat:@"%.2f",unitprice* (1.0-discount/100)];
+            NSString* totalprice = [NSString stringWithFormat:@"%.2f",(unitprice* (1.0-discount/100)+dprice)*count];
             
             
             

+ 13 - 0
RedAnt ERP Mobile/common/Functions/BundleDetailButton.h

@@ -0,0 +1,13 @@
+//
+//  BundleDetailButton.h
+//  iSales-NPD
+//
+//  Created by Ray on 6/15/16.
+//  Copyright © 2016 United Software Applications, Inc. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface BundleDetailButton : UIButton
+
+@end

+ 21 - 0
RedAnt ERP Mobile/common/Functions/BundleDetailButton.m

@@ -0,0 +1,21 @@
+//
+//  BundleDetailButton.m
+//  iSales-NPD
+//
+//  Created by Ray on 6/15/16.
+//  Copyright © 2016 United Software Applications, Inc. All rights reserved.
+//
+
+#import "BundleDetailButton.h"
+
+@implementation BundleDetailButton
+
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+@end