⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 moneyrep.pas

📁 物资管理系统
💻 PAS
字号:
unit moneyRep;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, QRCtrls, QuickRpt, ExtCtrls, DB, DBTables;

type
  TfrmMoneyRep = class(TForm)
    QuickRep1: TQuickRep;
    QRBand1: TQRBand;
    QRBand2: TQRBand;
    QRBand3: TQRBand;
    QRBand4: TQRBand;
    QRBand5: TQRBand;
    QRLabel1: TQRLabel;
    QRSysData1: TQRSysData;
    QRLabel2: TQRLabel;
    QRLabel3: TQRLabel;
    QRLabel4: TQRLabel;
    QRLabel6: TQRLabel;
    QRDBText1: TQRDBText;
    QRDBText2: TQRDBText;
    QRDBText3: TQRDBText;
    QRDBText4: TQRDBText;
    Table1: TTable;
    Table2: TTable;
    Table3: TTable;
    QRSysData2: TQRSysData;
    QRLabel5: TQRLabel;
    QRLabel7: TQRLabel;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmMoneyRep: TfrmMoneyRep;

implementation

{$R *.dfm}

procedure TfrmMoneyRep.FormCreate(Sender: TObject);
begin
   {删除资金盘点表中所有记录}
   with table3 do
   begin
      open;
      while not eof do
      begin
         delete;
      end;
      close;
   end;
   {根据资金下拨表和资金入帐表重新填写盘点表}
   table1.open;
   table3.Open;
   while not table1.eof do
   begin
      table3.Insert;
      table3.fieldValues['流动日期']:=table1.fieldByName('拨款日期').AsString;
      table3.fieldValues['资金流向']:='下拨';
      table3.fieldValues['流动金额']:=table1.fieldByName('资金数额').AsString;
      table3.fieldValues['来源/用途']:=table1.fieldByName('用途').AsString;
      table3.post;
      table1.next;
   end;
   table1.close;
   table3.Close;
   table2.Open;
   table3.Open;
   while not table2.Eof do
   begin
      table3.Insert;
      table3.fieldValues['流动日期']:=table2.fieldByName('入帐日期').AsString;
      table3.fieldValues['资金流向']:='入帐';
      table3.fieldValues['流动金额']:=table2.fieldByName('资金数额').AsString;
      table3.fieldValues['来源/用途']:=table2.fieldByName('资金来源').AsString;
      table3.Post;
      table2.Next;
   end;
   table2.Close;
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -