You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
1.7 KiB
Plaintext

unit u_op_date_change;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, wwdbdatetimepicker, bsSkinCtrls, BusinessSkinForm, DB;
type
Tfrm_op_date_change = class(TForm)
Label1: TLabel;
wwDBDateTimePicker1: TwwDBDateTimePicker;
bsBusinessSkinForm1: TbsBusinessSkinForm;
bsSkinButton1: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
DataSource1: TDataSource;
procedure bsSkinButton5Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
BSTYPE:string;
end;
var
frm_op_date_change: Tfrm_op_date_change;
implementation
uses my_sys_function;
{$R *.dfm}
procedure Tfrm_op_date_change.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_op_date_change.bsSkinButton1Click(Sender: TObject);
begin
if wwDBDateTimePicker1.text='' then
begin
showmessage('请输入新的会计期间!!');
exit;
end;
DataSource1.DataSet.edit;
if strtobool(get_parameters_value(12,'false')) then
begin
DataSource1.DataSet['业务编号']:=get_no_change(wwDBDateTimePicker1.date,DataSource1.DataSet['业务编号'])
end;
DataSource1.DataSet['会计期间']:=wwDBDateTimePicker1.date;
if (strtoint(get_parameters_value(158,'0'))=1) and (Trim(DataSource1.dataset.FieldByName('业务类型').AsString)='更改单') then
AmendAccDate(BSTYPE,DataSource1);
DataSource1.DataSet['周次']:=WeekofYear(wwDBDateTimePicker1.date);
DataSource1.DataSet.post;
showmessage('会计期间更改成功!!');
close;
end;
procedure Tfrm_op_date_change.FormShow(Sender: TObject);
begin
wwDBDateTimePicker1.MinDate:=Logininfo.endday+1;
end;
end.