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