Reports & Invoices
مولد التقارير والفواتير
قسائم رواتب وكشوف وجرد بمقاس A4، وفواتير كاشير حرارية 80 مم — اطبعها فوراً أو انسخ كود إنشائها داخل أكسيس.
قسيمة راتب (A4)
شركة النور للتجارة
فرع القاهرة — قسيمة راتب
نوفمبر 2026
الموظف: أحمد محمود سالم
الإدارة: الحسابات
الرقم الوظيفي: 1024
طريقة الصرف: تحويل بنكي
| المستحقات | |
|---|---|
| الأساسي | ٧٬٢٠٠٫٠٠ |
| البدلات | ٨٠٠٫٠٠ |
| متغير غير خاضع | ٥٠٠٫٠٠ |
| الإضافي | ١٣٥٫٠٠ |
| الاستقطاعات | |
|---|---|
| التأخير | ١٥٫٠٠ |
| التأمينات | ٦٣٣٫٦٠ |
| السلفة | ٢٠٠٫٠٠ |
صافي الراتب: ٧٬٧٨٦٫٤٠
توقيع المستلم: ............
اعتماد الحسابات: ............
كود إنشاء التقرير في أكسيس
افتح قاعدة البيانات ← Alt+F11 ← Insert › Module ← الصق الكود ← ضع المؤشر داخل الإجراء واضغط F5. سيظهر التقرير باسم rpt_payslip.
rpt_payslip.bas
' ===== قسيمة راتب (A4) — paste into a standard module, then run Build_payslip
Public Sub Build_payslip()
Dim rpt As Report, lbl As Control, txt As Control
Set rpt = CreateReport
rpt.RecordSource = "Payroll"
rpt.Orientation = 1 ' right-to-left
rpt.Width = 10200
With rpt.Printer
.TopMargin = 720: .BottomMargin = 720
.LeftMargin = 720: .RightMargin = 720
.PaperSize = acPRPSA4
End With
rpt.Section(acPageHeader).Height = 1300
Set lbl = CreateReportControl(rpt.Name, acLabel, acPageHeader, , , 0, 60, 10200, 420)
lbl.Caption = ChrW(1588) & ChrW(1585) & ChrW(1603) & ChrW(1577) & " " & ChrW(1575) & ChrW(1604) & ChrW(1606) & ChrW(1608) & ChrW(1585) & " " & ChrW(1604) & ChrW(1604) & ChrW(1578) & ChrW(1580) & ChrW(1575) & ChrW(1585) & ChrW(1577): lbl.FontSize = 16: lbl.FontBold = True: lbl.TextAlign = 2
Set lbl = CreateReportControl(rpt.Name, acLabel, acPageHeader, , , 0, 480, 10200, 300)
lbl.Caption = ChrW(1601) & ChrW(1585) & ChrW(1593) & " " & ChrW(1575) & ChrW(1604) & ChrW(1602) & ChrW(1575) & ChrW(1607) & ChrW(1585) & ChrW(1577) & " - " & ChrW(1602) & ChrW(1587) & ChrW(1610) & ChrW(1605) & ChrW(1577) & " " & ChrW(1585) & ChrW(1575) & ChrW(1578) & ChrW(1576): lbl.TextAlign = 2
Set lbl = CreateReportControl(rpt.Name, acLabel, acPageHeader, , , 6120, 900, 4080, 320)
lbl.Caption = ChrW(1575) & ChrW(1587) & ChrW(1605) & " " & ChrW(1575) & ChrW(1604) & ChrW(1605) & ChrW(1608) & ChrW(1592) & ChrW(1601): lbl.FontBold = True: lbl.TextAlign = 3
Set txt = CreateReportControl(rpt.Name, acTextBox, acDetail, , "EmployeeName", 6120, 40, 4080, 300)
txt.TextAlign = 3: txt.BorderStyle = 0
Set lbl = CreateReportControl(rpt.Name, acLabel, acPageHeader, , , 4080, 900, 2040, 320)
lbl.Caption = ChrW(1575) & ChrW(1604) & ChrW(1571) & ChrW(1587) & ChrW(1575) & ChrW(1587) & ChrW(1610): lbl.FontBold = True: lbl.TextAlign = 3
Set txt = CreateReportControl(rpt.Name, acTextBox, acDetail, , "BasicSalary", 4080, 40, 2040, 300)
txt.TextAlign = 3: txt.BorderStyle = 0
Set lbl = CreateReportControl(rpt.Name, acLabel, acPageHeader, , , 2040, 900, 2040, 320)
lbl.Caption = ChrW(1575) & ChrW(1604) & ChrW(1582) & ChrW(1589) & ChrW(1608) & ChrW(1605) & ChrW(1575) & ChrW(1578): lbl.FontBold = True: lbl.TextAlign = 3
Set txt = CreateReportControl(rpt.Name, acTextBox, acDetail, , "TotalDeductions", 2040, 40, 2040, 300)
txt.TextAlign = 3: txt.BorderStyle = 0
Set lbl = CreateReportControl(rpt.Name, acLabel, acPageHeader, , , 0, 900, 2040, 320)
lbl.Caption = ChrW(1575) & ChrW(1604) & ChrW(1589) & ChrW(1575) & ChrW(1601) & ChrW(1610): lbl.FontBold = True: lbl.TextAlign = 3
Set txt = CreateReportControl(rpt.Name, acTextBox, acDetail, , "NetSalary", 0, 40, 2040, 300)
txt.TextAlign = 3: txt.BorderStyle = 0
rpt.Section(acDetail).Height = 380
rpt.Section(acFooter).Visible = True
Set txt = CreateReportControl(rpt.Name, acTextBox, acFooter, , "=Sum([NetSalary])", 0, 60, 3400, 340)
txt.Format = "#,##0.00": txt.FontBold = True
Set lbl = CreateReportControl(rpt.Name, acLabel, acFooter, , , 3400, 60, 3400, 340)
lbl.Caption = ChrW(1575) & ChrW(1604) & ChrW(1573) & ChrW(1580) & ChrW(1605) & ChrW(1575) & ChrW(1604) & ChrW(1610): lbl.TextAlign = 3
Set txt = CreateReportControl(rpt.Name, acTextBox, acPageFooter, , "=""Page "" & [Page] & "" / "" & [Pages]", 0, 60, 10200, 300)
txt.TextAlign = 2
Set lbl = CreateReportControl(rpt.Name, acLabel, acFooter, , , 0, 460, 10200, 300)
lbl.Caption = ChrW(1588) & ChrW(1603) & ChrW(1585) & ChrW(1575) & ChrW(1611) & " " & ChrW(1604) & ChrW(1578) & ChrW(1593) & ChrW(1575) & ChrW(1605) & ChrW(1604) & ChrW(1603) & ChrW(1605) & " " & ChrW(1605) & ChrW(1593) & ChrW(1606) & ChrW(1575): lbl.TextAlign = 2
Dim nm As String: nm = rpt.Name
DoCmd.Close acReport, nm, acSaveYes
On Error Resume Next: DoCmd.DeleteObject acReport, "rpt_payslip": On Error GoTo 0
DoCmd.Rename "rpt_payslip", acReport, nm
MsgBox "Report rpt_payslip created", vbInformation
End Sub