合同
This commit is contained in:
parent
bc08f48404
commit
0818a55323
|
|
@ -970,6 +970,15 @@ inherited frmSalesConInPut: TfrmSalesConInPut
|
|||
Options.Sorting = False
|
||||
Width = 70
|
||||
end
|
||||
object Tv1SampleFee: TcxGridDBColumn
|
||||
Caption = #35797#26679#36153
|
||||
DataBinding.FieldName = 'sample_fee'
|
||||
DataBinding.IsNullValueType = True
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = v1PRTOrderQtyPropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object Tv1Column9: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'ConTotalAmount'
|
||||
|
|
|
|||
|
|
@ -132,6 +132,7 @@ type
|
|||
SalesId: TEdit;
|
||||
TallyId: TEdit;
|
||||
Tv1c_p_length: TcxGridDBColumn;
|
||||
Tv1SampleFee: TcxGridDBColumn;
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBSaveClick(Sender: TObject);
|
||||
|
|
@ -246,15 +247,16 @@ end;
|
|||
|
||||
procedure TfrmSalesConInPut.JSMoney();
|
||||
var
|
||||
FConQty, FConPrice, FC_Money: Double;
|
||||
FConQty, FConPrice, FSampleFee, FC_Money: Double;
|
||||
begin
|
||||
with Order_Sub do
|
||||
begin
|
||||
FConQty := Fieldbyname('ConQty').AsFloat;
|
||||
FConPrice := Fieldbyname('ConPrice').AsFloat;
|
||||
FSampleFee := Fieldbyname('sample_fee').AsFloat;
|
||||
end;
|
||||
//计算金额,保留2位小数
|
||||
FC_Money := RoundFloat(FConQty * FConPrice, 2);
|
||||
//计算金额,保留2位小数(金额=数量*单价+试样费)
|
||||
FC_Money := RoundFloat(FConQty * FConPrice + FSampleFee, 2);
|
||||
with Order_Sub do
|
||||
begin
|
||||
Edit;
|
||||
|
|
@ -744,7 +746,7 @@ end;
|
|||
procedure TfrmSalesConInPut.v1PRTOrderQtyPropertiesEditValueChanged(Sender: TObject);
|
||||
var
|
||||
mvalue, FFieldName: string;
|
||||
FConQty, FConPrice, FC_Money: Double; //个数,单价,金额
|
||||
FConQty, FConPrice, FSampleFee, FC_Money: Double; //个数,单价,试样费,金额
|
||||
begin
|
||||
mvalue := TcxTextEdit(Sender).EditingText;
|
||||
if Trim(mvalue) = '' then
|
||||
|
|
@ -760,14 +762,17 @@ begin
|
|||
Post;
|
||||
FConQty := Fieldbyname('ConQty').AsFloat;
|
||||
FConPrice := Fieldbyname('ConPrice').AsFloat;
|
||||
FSampleFee := Fieldbyname('sample_fee').AsFloat;
|
||||
end;
|
||||
FC_Money := RoundFloat(FConQty * FConPrice, 2);
|
||||
//金额=数量*单价+试样费
|
||||
FC_Money := RoundFloat(FConQty * FConPrice + FSampleFee, 2);
|
||||
|
||||
with Order_Sub do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('ConQty').Value := FConQty;
|
||||
FieldByName('ConPrice').Value := FConPrice;
|
||||
FieldByName('sample_fee').Value := FSampleFee;
|
||||
FieldByName('ConTotalAmount').Value := FC_Money;
|
||||
Post;
|
||||
end;
|
||||
|
|
@ -827,9 +832,10 @@ begin
|
|||
FieldByName('SSEL').Value := FALSE;
|
||||
FieldByName('SerialNo').Value := i;
|
||||
FieldByName('ConSId').Value := maxno;
|
||||
FieldByName('C_Color').Value := '';
|
||||
FieldByName('ConQty').Value := null;
|
||||
FieldByName('ConUnit').Value := 'M';
|
||||
FieldByName('C_Color').Value := '';
|
||||
FieldByName('ConQty').Value := null;
|
||||
FieldByName('sample_fee').Value := null;
|
||||
FieldByName('ConUnit').Value := 'M';
|
||||
Post;
|
||||
end;
|
||||
SetXH();
|
||||
|
|
|
|||
|
|
@ -692,6 +692,7 @@ inherited frmSalesContractList: TfrmSalesContractList
|
|||
Height = 8
|
||||
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||
AlignSplitter = salBottom
|
||||
ExplicitWidth = 8
|
||||
end
|
||||
object cxGrid2: TcxGrid [5]
|
||||
Left = 0
|
||||
|
|
@ -915,6 +916,15 @@ inherited frmSalesContractList: TfrmSalesContractList
|
|||
Options.Sorting = False
|
||||
Width = 70
|
||||
end
|
||||
object TV2SampleFee: TcxGridDBColumn
|
||||
Caption = #35797#26679#36153
|
||||
DataBinding.FieldName = 'sample_fee'
|
||||
DataBinding.IsNullValueType = True
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object cxGridDBColumn9: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'ConTotalAmount'
|
||||
|
|
|
|||
|
|
@ -142,6 +142,7 @@ type
|
|||
N5: TMenuItem;
|
||||
N6: TMenuItem;
|
||||
TV2c_p_length: TcxGridDBColumn;
|
||||
TV2SampleFee: TcxGridDBColumn;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user