Commit b832e80a authored by Sandy's avatar Sandy

bug fix

parent c2e95cd6
...@@ -1935,7 +1935,7 @@ ...@@ -1935,7 +1935,7 @@
72F9D48A1BA8582100795A00 /* NoticeBoltView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NoticeBoltView.m; sourceTree = "<group>"; }; 72F9D48A1BA8582100795A00 /* NoticeBoltView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NoticeBoltView.m; sourceTree = "<group>"; };
7DDFB1D460448C3B45118195 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; }; 7DDFB1D460448C3B45118195 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
86D33EC280C440156ED1B976 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; 86D33EC280C440156ED1B976 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
8F0F9B6E1F2A3AE7004FB434 /* XFFruit copy 2.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; name = "XFFruit copy 2.app"; path = XFFruit_TEST.app; sourceTree = BUILT_PRODUCTS_DIR; }; 8F0F9B6E1F2A3AE7004FB434 /* XFFruit_TEST.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = XFFruit_TEST.app; sourceTree = BUILT_PRODUCTS_DIR; };
8F0F9B6F1F2A3AE8004FB434 /* XFFruit_TEST.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = XFFruit_TEST.plist; path = /Users/Javen/Documents/MyProject/xffruit/XFFruit_TEST.plist; sourceTree = "<absolute>"; }; 8F0F9B6F1F2A3AE8004FB434 /* XFFruit_TEST.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = XFFruit_TEST.plist; path = /Users/Javen/Documents/MyProject/xffruit/XFFruit_TEST.plist; sourceTree = "<absolute>"; };
8F1523D11F21B2D4004ECC7B /* PurchaseReceiveProductCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PurchaseReceiveProductCell.h; sourceTree = "<group>"; }; 8F1523D11F21B2D4004ECC7B /* PurchaseReceiveProductCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PurchaseReceiveProductCell.h; sourceTree = "<group>"; };
8F1523D21F21B2D4004ECC7B /* PurchaseReceiveProductCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PurchaseReceiveProductCell.m; sourceTree = "<group>"; }; 8F1523D21F21B2D4004ECC7B /* PurchaseReceiveProductCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PurchaseReceiveProductCell.m; sourceTree = "<group>"; };
...@@ -3784,7 +3784,7 @@ ...@@ -3784,7 +3784,7 @@
C1F6961C1AB870B400F9F5DD /* XFFruitTests.xctest */, C1F6961C1AB870B400F9F5DD /* XFFruitTests.xctest */,
8FEE27391DB60B570099B596 /* XFFruit copy.app */, 8FEE27391DB60B570099B596 /* XFFruit copy.app */,
8F250CD81F2891C60031B4BC /* XFFruit_DEV.app */, 8F250CD81F2891C60031B4BC /* XFFruit_DEV.app */,
8F0F9B6E1F2A3AE7004FB434 /* XFFruit copy 2.app */, 8F0F9B6E1F2A3AE7004FB434 /* XFFruit_TEST.app */,
); );
name = Products; name = Products;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -3965,7 +3965,7 @@ ...@@ -3965,7 +3965,7 @@
); );
name = XFFruit_TEST; name = XFFruit_TEST;
productName = Cruiser; productName = Cruiser;
productReference = 8F0F9B6E1F2A3AE7004FB434 /* XFFruit copy 2.app */; productReference = 8F0F9B6E1F2A3AE7004FB434 /* XFFruit_TEST.app */;
productType = "com.apple.product-type.application"; productType = "com.apple.product-type.application";
}; };
8F250B721F2891C60031B4BC /* XFFruit_DEV */ = { 8F250B721F2891C60031B4BC /* XFFruit_DEV */ = {
...@@ -4057,6 +4057,7 @@ ...@@ -4057,6 +4057,7 @@
TargetAttributes = { TargetAttributes = {
8F0F9A081F2A3AE7004FB434 = { 8F0F9A081F2A3AE7004FB434 = {
DevelopmentTeam = W54V2VB863; DevelopmentTeam = W54V2VB863;
ProvisioningStyle = Automatic;
}; };
8F250B721F2891C60031B4BC = { 8F250B721F2891C60031B4BC = {
DevelopmentTeam = W54V2VB863; DevelopmentTeam = W54V2VB863;
...@@ -6159,7 +6160,7 @@ ...@@ -6159,7 +6160,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer: jie zhang (9V9955H2BK)"; CODE_SIGN_IDENTITY = "iPhone Developer: jie zhang (9V9955H2BK)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPYING_PRESERVES_HFS_DATA = NO; COPYING_PRESERVES_HFS_DATA = NO;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = W54V2VB863;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
GCC_PREFIX_HEADER = "XFFruit/XFFruit-Prefix.pch"; GCC_PREFIX_HEADER = "XFFruit/XFFruit-Prefix.pch";
INFOPLIST_FILE = XFFruit/Info.plist; INFOPLIST_FILE = XFFruit/Info.plist;
...@@ -6186,7 +6187,7 @@ ...@@ -6186,7 +6187,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPYING_PRESERVES_HFS_DATA = NO; COPYING_PRESERVES_HFS_DATA = NO;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = W54V2VB863;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
GCC_PREFIX_HEADER = "XFFruit/XFFruit-Prefix.pch"; GCC_PREFIX_HEADER = "XFFruit/XFFruit-Prefix.pch";
INFOPLIST_FILE = XFFruit/Info.plist; INFOPLIST_FILE = XFFruit/Info.plist;
......
No preview for this file type
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#import "PurchaseReceiveProductCell.h" #import "PurchaseReceiveProductCell.h"
#import "PurchaseBillProduct.h" #import "PurchaseBillProduct.h"
#define TableHeight 44 #define TableHeight 44
#define ShowHeight 170 #define ShowHeight 200
#define HeaderHeight 40 #define HeaderHeight 40
@interface PurchaseReceiveProductViewController ()<UITableViewDataSource,UITableViewDelegate,HeaderCellDelegate> @interface PurchaseReceiveProductViewController ()<UITableViewDataSource,UITableViewDelegate,HeaderCellDelegate>
{ {
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#import "ChooseProductViewController.h" #import "ChooseProductViewController.h"
#import "ChooseProductUnitViewController.h" #import "ChooseProductUnitViewController.h"
#import "GeometryView.h" #import "GeometryView.h"
#import "CalculateHelper.h"
#define LeftMargin 15 #define LeftMargin 15
#define BtnHeight 44 #define BtnHeight 44
#define TableRowHeight 46 #define TableRowHeight 46
...@@ -157,8 +158,8 @@ ...@@ -157,8 +158,8 @@
self.noticeProduct = [[TransferPdtDetail alloc]init]; self.noticeProduct = [[TransferPdtDetail alloc]init];
} }
self.noticeProduct.rctQty =[NSNumber numberWithFloat:[_shPackField.text floatValue]]; self.noticeProduct.rctQty =[NSDecimalNumber decimalNumberWithString:_shPackField.text];
self.noticeProduct.rctBaseQty = [NSNumber numberWithFloat:[_shBaseQuantityField.text floatValue]]; self.noticeProduct.rctBaseQty = [NSDecimalNumber decimalNumberWithString:_shBaseQuantityField.text];
self.noticeProduct.note = _noteTextView.text; self.noticeProduct.note = _noteTextView.text;
return YES; return YES;
} }
...@@ -301,6 +302,7 @@ ...@@ -301,6 +302,7 @@
if (textField == _shPackField) { if (textField == _shPackField) {
if (_shPackField.text.length > 0) { if (_shPackField.text.length > 0) {
//基础数量【实收】= 包装数量【实收】* 规格 //基础数量【实收】= 包装数量【实收】* 规格
// NSDecimalNumber *baseCount = [
float baseCount = [_shPackField.text floatValue] * [self.noticeProduct.qpc floatValue]; float baseCount = [_shPackField.text floatValue] * [self.noticeProduct.qpc floatValue];
_shBaseQuantityField.text = [NSString stringWithFormat:@"%.2f",baseCount]; _shBaseQuantityField.text = [NSString stringWithFormat:@"%.2f",baseCount];
//总金额【实收】= 基础数量【实收】* 基础单价 //总金额【实收】= 基础数量【实收】* 基础单价
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
// //
#import "TransferPdtDetail.h" #import "TransferPdtDetail.h"
#import "CalculateHelper.h"
@implementation TransferPdtDetail @implementation TransferPdtDetail
- (void)setPurchasePdt:(PurchaseBillProduct *)purchasePdt { - (void)setPurchasePdt:(PurchaseBillProduct *)purchasePdt {
...@@ -58,17 +58,18 @@ ...@@ -58,17 +58,18 @@
- (void)z_setRctQty:(CGFloat)qty { - (void)z_setRctQty:(CGFloat)qty {
//基础数量【实收】= 包装数量【实收】* 规格 //基础数量【实收】= 包装数量【实收】* 规格
float baseCount = qty * [self.qpc floatValue]; // float baseCount = qty * [self.qpc floatValue];
NSDecimalNumber *baseCount = [CalculateHelper calculateNum1:self.qpc num2:@(qty) type:CalculateTypeMul roundingType:NSRoundPlain cutLenth:2];
//总金额【实收】= 基础数量【实收】* 基础单价 //总金额【实收】= 基础数量【实收】* 基础单价
float total = 0; NSDecimalNumber *total = [NSDecimalNumber decimalNumberWithString:@"0"];
if (qty == [self.qty floatValue]) { if (qty == [self.qty floatValue]) {
total = [self.total floatValue]; total = [NSDecimalNumber decimalNumberWithDecimal:self.total.decimalValue];
}else{ }else{
total = baseCount * [self.price floatValue]; total = [CalculateHelper calculateNum1:baseCount num2:self.price type:CalculateTypeMul roundingType:NSRoundPlain cutLenth:2];
} }
self.rctQty = [NSNumber numberWithFloat:qty]; self.rctQty = [NSNumber numberWithFloat:qty];
self.rctBaseQty = [NSNumber numberWithFloat:baseCount]; self.rctBaseQty = baseCount;
self.rctTotal = [NSNumber numberWithFloat:total]; self.rctTotal = total;
} }
@end @end
...@@ -139,9 +139,9 @@ typedef enum : NSUInteger { ...@@ -139,9 +139,9 @@ typedef enum : NSUInteger {
} }
self.accountDetail.accounttitle = _chooseCostLabel.text; self.accountDetail.accounttitle = _chooseCostLabel.text;
self.accountDetail.accounttitlename = _chooseCostLabel.text; self.accountDetail.accounttitlename = _chooseCostLabel.text;
self.accountDetail.actualmoney = [NSNumber numberWithFloat:[_actualmoneyField.text floatValue]]; self.accountDetail.actualmoney = [NSDecimalNumber decimalNumberWithString:_actualmoneyField.text];
self.accountDetail.paidmoney = [NSNumber numberWithFloat:[_paidmoneyField.text floatValue]]; self.accountDetail.paidmoney = [NSDecimalNumber decimalNumberWithString:_paidmoneyField.text];
self.accountDetail.leftmoney = [NSNumber numberWithFloat:[_leftmoneyField.text floatValue]]; self.accountDetail.leftmoney = [NSDecimalNumber decimalNumberWithString:_leftmoneyField.text];
self.accountDetail.note = _noteTextView.text; self.accountDetail.note = _noteTextView.text;
return YES; return YES;
} }
......
...@@ -533,12 +533,12 @@ typedef enum : NSUInteger { ...@@ -533,12 +533,12 @@ typedef enum : NSUInteger {
billProduct.productUuid = shopDetail.product_uuid; billProduct.productUuid = shopDetail.product_uuid;
billProduct.productCode = shopDetail.product_code; billProduct.productCode = shopDetail.product_code;
billProduct.productName = shopDetail.merchandise; billProduct.productName = shopDetail.merchandise;
billProduct.qpc = [NSNumber numberWithFloat:[shopDetail.packageSpecification floatValue]]; billProduct.qpc = [NSDecimalNumber decimalNumberWithString:shopDetail.packageSpecification];
billProduct.unit = shopDetail.packageUnit; billProduct.unit = shopDetail.packageUnit;
billProduct.qty = [NSNumber numberWithFloat:[shopDetail.packageQuantity floatValue]]; billProduct.qty = [NSDecimalNumber decimalNumberWithString:shopDetail.packageQuantity];
billProduct.packprice = [NSNumber numberWithFloat:[shopDetail.packageUnitPrice floatValue]]; billProduct.packprice = shopDetail.packageUnitPrice;
billProduct.price = [NSNumber numberWithFloat:[shopDetail.foundationUnitPrice floatValue]]; billProduct.price = shopDetail.foundationUnitPrice;
billProduct.baseQty = [NSNumber numberWithDouble:[shopDetail.foundationQuantity doubleValue]]; billProduct.baseQty = [NSDecimalNumber decimalNumberWithString:shopDetail.foundationQuantity];
billProduct.total = shopDetail.total; billProduct.total = shopDetail.total;
billProduct.note = shopDetail.remark; billProduct.note = shopDetail.remark;
billProduct.qpcStr = shopDetail.packageQpcStr ? shopDetail.packageQpcStr : @"无" ; billProduct.qpcStr = shopDetail.packageQpcStr ? shopDetail.packageQpcStr : @"无" ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment