frm_AR_Order_Entry

C:\Integral Accounting Pro v3.1 (Full Version)\Project\frm_AR_Order_Entry.frm
Generated: 4/16/2003 2:02:11 PM


Table of Contents
GetCurrentDirectory Lib "kernel32" Alias "GetCurrentDirectoryA"
AR_ORDER_Customer_ID_AfterUpdate
OpenDB
CheckCreditLimit
Datavalidate
adoPrimaryRS_RecordChangeComplete
cbPurchase_Click
cbPurchase_KeyPress
cbPurchase_LostFocus
cmdAddNewCust_Click
cmdCalculation_Click
cmdLookupCust_Click
cmdLookupOrderDoc_Click
cmdLookupPurchaseOrder_Click
cmdPrint_Click
cmdUpdatedua_Click
Change_ComboBox
set_ComboBox
LoadCombo
chkTaxFreight_Click
cmdbankAccount_Click
cmdCreateInvoice_Click
RedoNumbers
cmdDate_Click
cmdInvoiceBackOrder_Click
cmdLookupAdd_Click
cmdLookupShip_Click
cmdSmallBig_Click
GetNumberDoc
Form_Load
Form_Resize
Form_KeyDown
Form_Unload
adoPrimaryRS_MoveComplete
ButtEnabled
adoPrimaryRS_WillChangeRecord
RefreshDB
cmdAdd_Click
SetDueDate
cmdDelete_Click
cmdRefresh_Click
cmdEdit_Click
cmdCancel_Click
cmdUpdate_Click
cmdClose_Click
cmdFirst_Click
cmdLast_Click
cmdNext_Click
cmdPrevious_Click
SetButtons
grdDataGrid_AfterDelete
grdDataGrid_Error
grdDataGrid_GotFocus
grdDataGrid_OnAddNew
grdDataGrid_RowColChange
grdDataGrid_AfterColEdit
grdDataGrid_BeforeDelete
NewgrdDatagrid
grdDataGrid_ButtonClick
INV_ITEM
COA_grdDataGrid_Butt
Proj_Projects
CalculateTable
AddNewROW_to_grd
CalcSalesTaxPercent
CalcTotals
calculateALL
CheckEmpty
optOrderType_Click
txtFields_LostFocus

VERSION 5.00 Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "msdatgrd.ocx" Begin VB.Form frm_AR_Order_Entry Caption = "Order Entry" ClientHeight = 8595 ClientLeft = 1020 ClientTop = 1290 ClientWidth = 15240 LinkTopic = "Form1" MDIChild = -1 'True ScaleHeight = 8595 ScaleWidth = 15240 Begin VB.PictureBox picMajorbutton BorderStyle = 0 'None Height = 495 Left = 10920 ScaleHeight = 495 ScaleWidth = 555 TabIndex = 86 Top = 150 Width = 555 Begin VB.CommandButton cmdSmallBig BackColor = &H0080FFFF& Caption = ">>" BeginProperty Font Name = "Tahoma" Size = 8.25 Charset = 238 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 375 Left = 150 Style = 1 'Graphical TabIndex = 34 Top = 45 Width = 360 End End Begin VB.Frame frAdvance Height = 8535 Left = 11610 TabIndex = 56 Top = 15 Width = 3495 Begin VB.Frame Frame1 Height = 1530 Left = 165 TabIndex = 115 Top = 5715 Width = 3210 Begin VB.CommandButton cmdDate Height = 285 Index = 20 Left = 2670 Picture = "frm_AR_Order_Entry.frx":0000 Style = 1 'Graphical TabIndex = 124 Top = 1065 Width = 375 End Begin VB.TextBox txtfields BackColor = &H00E0E0E0& DataField = "AR ORDER Ship Date" BeginProperty DataFormat Type = 1 Format = "MM/dd/yyyy" HaveTrueFalseNull= 0 FirstDayOfWeek = 0 FirstWeekOfYear = 0 LCID = 1033 SubFormatType = 3 EndProperty Height = 285 Index = 20 Left = 1440 Locked = -1 'True TabIndex = 123 Top = 1065 Width = 1230 End Begin VB.CommandButton cmdDate Height = 285 Index = 1 Left = 2655 Picture = "frm_AR_Order_Entry.frx":05DA Style = 1 'Graphical TabIndex = 121 Top = 660 Width = 375 End Begin VB.TextBox txtfields BackColor = &H00E0E0E0& DataField = "AR ORDER Due Date" BeginProperty DataFormat Type = 1 Format = "MM/dd/yyyy" HaveTrueFalseNull= 0 FirstDayOfWeek = 0 FirstWeekOfYear = 0 LCID = 1033 SubFormatType = 3 EndProperty Height = 285 Index = 6 Left = 1440 Locked = -1 'True TabIndex = 120 Top = 675 Width = 1230 End Begin VB.CommandButton cmdDate Height = 285 Index = 0 Left = 2655 Picture = "frm_AR_Order_Entry.frx":0BB4 Style = 1 'Graphical TabIndex = 119 Top = 270 Width = 375 End Begin VB.TextBox txtfields BackColor = &H00E0E0E0& DataField = "AR ORDER Date" BeginProperty DataFormat Type = 1 Format = "MM/dd/yyyy" HaveTrueFalseNull= 0 FirstDayOfWeek = 0 FirstWeekOfYear = 0 LCID = 1033 SubFormatType = 3 EndProperty Height = 285 Index = 7 Left = 1455 Locked = -1 'True TabIndex = 117 Top = 270 Width = 1230 End Begin VB.TextBox txtfields BackColor = &H00E0E0E0& DataField = "AR ORDER Date" BeginProperty DataFormat Type = 1 Format = "MM/dd/yyyy" HaveTrueFalseNull= 0 FirstDayOfWeek = 0 FirstWeekOfYear = 0 LCID = 1033 SubFormatType = 3 EndProperty Height = 285 Index = 4 Left = 1440 Locked = -1 'True TabIndex = 116 Top = 285 Visible = 0 'False Width = 1230 End Begin VB.Label lblfields Alignment = 1 'Right Justify Appearance = 0 'Flat BackColor = &H80000000& BackStyle = 0 'Transparent Caption = "Date: " ForeColor = &H80000008& Height = 255 Index = 4 Left = 1425 TabIndex = 126 Top = 375 Visible = 0 'False Width = 1275 End Begin VB.Label lblfields Alignment = 1 'Right Justify Appearance = 0 'Flat BackColor = &H80000004& Caption = "Ship Date: " ForeColor = &H80000008& Height = 255 Index = 20 Left = 165 TabIndex = 125 Top = 1080 Width = 1290 End Begin VB.Label lblfields Alignment = 1 'Right Justify Appearance = 0 'Flat BackColor = &H80000000& Caption = "Due Date: " ForeColor = &H80000008& Height = 255 Index = 6 Left = 195 TabIndex = 122 Top = 690 Width = 1260 End Begin VB.Label lblfields Alignment = 1 'Right Justify Appearance = 0 'Flat BackColor = &H80000000& Caption = "Order Date: " ForeColor = &H80000008& Height = 255 Index = 7 Left = 240 TabIndex = 118 Top = 285 Width = 1215 End End Begin VB.PictureBox PcData BorderStyle = 0 'None Height = 4155 Left = 120 ScaleHeight = 4155 ScaleWidth = 3255 TabIndex = 87 Top = 1470 Width = 3255 Begin VB.CommandButton cmdLookupPurchaseOrder Height = 315 Left = 2685 Picture = "frm_AR_Order_Entry.frx":118E Style = 1 'Graphical TabIndex = 130 ToolTipText = "Find and open Purchase order" Top = 705 Width = 375 End Begin VB.CommandButton cmdLookupOrderDoc Height = 315 Left = 2715 Picture = "frm_AR_Order_Entry.frx":14B9 Style = 1 'Graphical TabIndex = 129 ToolTipText = "Find and open order document" Top = 165 Width = 375 End Begin VB.CommandButton cmdUpdatedua Height = 345 Index = 16 Left = 2685 Picture = "frm_AR_Order_Entry.frx":17E4 Style = 1 'Graphical TabIndex = 106 ToolTipText = "Update the Payment Methods" Top = 3210 Width = 375 End Begin VB.CommandButton cmdUpdatedua Height = 375 Index = 15 Left = 2670 Picture = "frm_AR_Order_Entry.frx":1C9A Style = 1 'Graphical TabIndex = 105 ToolTipText = "Update the Recurring" Top = 3780 Width = 405 End Begin VB.ComboBox cbPurchase DataField = "AR ORDER Recur Type" Height = 315 Index = 15 ItemData = "frm_AR_Order_Entry.frx":2150 Left = 345 List = "frm_AR_Order_Entry.frx":2152 TabIndex = 41 Text = "cbPurchase" Top = 3825 Width = 2340 End Begin VB.ComboBox cbPurchase DataField = "AR ORDER Payment Method" Height = 315 Index = 16 ItemData = "frm_AR_Order_Entry.frx":2154 Left = 345 List = "frm_AR_Order_Entry.frx":2156 TabIndex = 43 Text = "cbPurchase" Top = 3240 Width = 2355 End Begin VB.TextBox txtfields DataField = "AR ORDER Amount Paid" BeginProperty DataFormat Type = 1 Format = """$""#,##0.00" HaveTrueFalseNull= 0 FirstDayOfWeek = 0 FirstWeekOfYear = 0 LCID = 1033 SubFormatType = 2 EndProperty Height = 285 Index = 36 Left = 345 TabIndex = 45 Top = 1665 Width = 2670 End Begin VB.TextBox txtfields DataField = "AR ORDER Check Acct ID" Height = 285 Index = 35 Left = 345 Locked = -1 'True TabIndex = 44 Top = 2685 Width = 2340 End Begin VB.TextBox txtfields DataField = "AR ORDER Check Number" Height = 285 Index = 34 Left = 345 TabIndex = 42 Top = 1185 Width = 2670 End Begin VB.TextBox txtfields DataField = "AR ORDER Balance Due" BeginProperty DataFormat Type = 1 Format = """$""#,##0.00" HaveTrueFalseNull= 0 FirstDayOfWeek = 0 FirstWeekOfYear = 0 LCID = 1033 SubFormatType = 2 EndProperty Height = 285 Index = 33 Left = 345 Locked = -1 'True TabIndex = 46 Top = 2175 Width = 2670 End Begin VB.TextBox txtfields DataField = "AR ORDER PO ID" Height = 285 Index = 14 Left = 360 TabIndex = 40 Top = 705 Width = 2340 End Begin VB.TextBox txtfields DataField = "AR ORDER Ext Document #" Height = 285 Index = 12 Left = 360 Locked = -1 'True TabIndex = 39 Top = 210 Width = 2340 End Begin VB.CommandButton cmdbankAccount Height = 285 Left = 2700 Picture = "frm_AR_Order_Entry.frx":2158 Style = 1 'Graphical TabIndex = 88 Top = 2685 Width = 375 End Begin VB.Label lblLabels Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H80000000& Caption = "Amount Paid" ForeColor = &H80000008& Height = 255 Index = 36 Left = 345 TabIndex = 96 Top = 1470 Width = 2685 End Begin VB.Label lblLabels Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H80000000& Caption = "Bank Account" ForeColor = &H80000008& Height = 255 Index = 35 Left = 330 TabIndex = 95 Top = 2460 Width = 2670 End Begin VB.Label lblLabels Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H80000000& Caption = "Check Number" ForeColor = &H80000008& Height = 255 Index = 34 Left = 345 TabIndex = 94 Top = 990 Width = 2685 End Begin VB.Label lblfields Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H80000004& Caption = "Payment methods " ForeColor = &H80000008& Height = 255 Index = 16 Left = 345 TabIndex = 93 Top = 3015 Width = 2700 End Begin VB.Label lblfields Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H80000004& Caption = "Recurring " ForeColor = &H80000008& Height = 255 Index = 15 Left = 345 TabIndex = 92 Top = 3570 Width = 2550 End Begin VB.Label lblLabels Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H80000000& Caption = "Balance Due" ForeColor = &H80000008& Height = 255 Index = 33 Left = 345 TabIndex = 91 Top = 1950 Width = 2685 End Begin VB.Label lblfields Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H80000004& Caption = "Purchase Order " ForeColor = &H80000008& Height = 255 Index = 14 Left = 375 TabIndex = 90 Top = 495 Width = 2670 End Begin VB.Label lblLabels Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H80000004& Caption = "Order Document " ForeColor = &H80000008& Height = 255 Index = 2 Left = 345 TabIndex = 89 Top = 0 Width = 2595 End End Begin VB.Frame frButton Height = 1230 Left = 165 TabIndex = 85 Top = 7200 Width = 3255 Begin VB.CommandButton cmdPrint Caption = "&Print" Height = 960 Left = 180 Picture = "frm_AR_Order_Entry.frx":246F Style = 1 'Graphical TabIndex = 47 Top = 180 Width = 1320 End Begin VB.CommandButton cmdInvoiceBackOrder Caption = "Create &Invoice" Height = 960 Left = 1755 Picture = "frm_AR_Order_Entry.frx":3591 Style = 1 'Graphical TabIndex = 52 Top = 180 Visible = 0 'False Width = 1320 End Begin VB.CommandButton cmdCreateInvoice Caption = "Create &Invoice" Height = 960 Left = 1740 Picture = "frm_AR_Order_Entry.frx":39D3 Style = 1 'Graphical TabIndex = 48 Top = 195 Width = 1320 End End Begin VB.PictureBox pcOption BorderStyle = 0 'None Height = 1230 Left = 90 Picture = "frm_AR_Order_Entry.frx":3E15 ScaleHeight = 1230 ScaleWidth = 3255 TabIndex = 60 Top = 180 Width = 3255 Begin VB.Frame frStatus Caption = "Status" Height = 735 Left = 1740 TabIndex = 36 Top = 435 Width = 1455 Begin VB.PictureBox Picture2 BorderStyle = 0 'None Enabled = 0 'False Height = 375 Left = 120 ScaleHeight = 375 ScaleWidth = 1095 TabIndex = 37 Top = 240 Width = 1095 Begin VB.CheckBox chkInvoiced Caption = "Invoiced" DataField = "AR ORDER Invoiced" Height = 255 Left = 0 TabIndex = 61 Top = 120 Width = 1215 End End End Begin VB.OptionButton optOrderType Caption = "Back Order" Height = 255 Index = 1 Left = 60 TabIndex = 38 Top = 825 Width = 1575 End Begin VB.OptionButton optOrderType Caption = "Sales Order" Height = 255 Index = 0 Left = 45 TabIndex = 35 Top = 510 Value = -1 'True Width = 1575 End Begin VB.Label Label2 Alignment = 2 'Center Caption = "Sales Order" BeginProperty Font Name = "Arial" Size = 18 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00808000& Height = 405 Left = 480 TabIndex = 62 Top = 0 Width = 2535 End End End Begin VB.PictureBox pcMajor BorderStyle = 0 'None Height = 5955 Left = 0 ScaleHeight = 5955 ScaleWidth = 11595 TabIndex = 63 Top = -15 Width = 11595 Begin VB.Frame frFirst Height = 2655 Left = 0 TabIndex = 69 Top = 0 Width = 11535 Begin VB.CommandButton cmdAddNewCust Height = 375 Left = 5205 Picture = "frm_AR_Order_Entry.frx":4114 Style = 1 'Graphical TabIndex = 133 ToolTipText = "Add new customer" Top = 315 Width = 420 End Begin VB.CommandButton cmdLookupAdd Height = 375 Left = 4770 Picture = "frm_AR_Order_Entry.frx":4454 Style = 1 'Graphical TabIndex = 132 ToolTipText = "Find and add customer" Top = 315 Visible = 0 'False Width = 420 End Begin VB.TextBox txtFieldsShip DataField = "AR ORDER Shipping ID" Height = 285 Index = 0 Left = 7560 TabIndex = 8 Top = 360 Width = 2970 End Begin VB.TextBox txtFieldsCust DataField = "AR ORDER Billing Address 1" Height = 285 Index = 2 Left = 1440 Locked = -1 'True TabIndex = 2 Top = 1080 Width = 3735 End Begin VB.TextBox txtFieldsCust DataField = "AR ORDER Billing Address 2" Height = 285 Index = 3 Left = 1440 Locked = -1 'True TabIndex = 3 Top = 1440 Width = 3735 End Begin VB.TextBox txtFieldsCust DataField = "AR ORDER Billing City" Height = 285 Index = 4 Left = 1440 Locked = -1 'True TabIndex = 4 Top = 1800 Width = 2175 End Begin VB.TextBox txtFieldsCust DataField = "AR ORDER Billing Postal" Height = 285 Index = 6 Left = 4200 Locked = -1 'True TabIndex = 6 Top = 1800 Width = 975 End Begin VB.TextBox txtFieldsCust DataField = "AR ORDER Billing State" Height = 285 Index = 5 Left = 3720 Locked = -1 'True TabIndex = 5 Top = 1800 Width = 375 End Begin VB.TextBox txtFieldsCust DataField = "AR ORDER Billing Country" Height = 285 Index = 7 Left = 1440 Locked = -1 'True TabIndex = 7 Top = 2160 Width = 3735 End Begin VB.TextBox txtFieldsCust DataField = "AR ORDER Bill To" Height = 285 Index = 1 Left = 1440 Locked = -1 'True TabIndex = 1 Top = 720 Width = 3735 End Begin VB.TextBox txtFieldsShip DataField = "AR ORDER Ship To" Height = 285 Index = 1 Left = 7560 Locked = -1 'True TabIndex = 9 Top = 720 Width = 3735 End Begin VB.TextBox txtFieldsShip DataField = "AR ORDER Shipping Country" Height = 285 Index = 7 Left = 7560 Locked = -1 'True TabIndex = 15 Top = 2160 Width = 3735 End Begin VB.TextBox txtFieldsShip DataField = "AR ORDER Shipping State" Height = 285 Index = 5 Left = 9840 Locked = -1 'True TabIndex = 13 Top = 1800 Width = 375 End Begin VB.TextBox txtFieldsShip DataField = "AR ORDER Shipping Postal" Height = 285 Index = 6 Left = 10320 Locked = -1 'True TabIndex = 14 Top = 1800 Width = 975 End Begin VB.TextBox txtFieldsShip DataField = "AR ORDER Shipping City" Height = 285 Index = 4 Left = 7560 Locked = -1 'True TabIndex = 12 Top = 1800 Width = 2175 End Begin VB.TextBox txtFieldsShip DataField = "AR ORDER Shipping Address 2" Height = 285 Index = 3 Left = 7560 Locked = -1 'True TabIndex = 11 Top = 1440 Width = 3735 End Begin VB.TextBox txtFieldsShip DataField = "AR ORDER Shipping Address 1" Height = 285 Index = 2 Left = 7560 Locked = -1 'True TabIndex = 10 Top = 1080 Width = 3735 End Begin VB.CommandButton cmdLookupCust Height = 315 Left = 4830 Picture = "frm_AR_Order_Entry.frx":4749 Style = 1 'Graphical TabIndex = 71 Top = 345 Width = 375 End Begin VB.CommandButton cmdLookupShip Height = 315 Left = 10530 Picture = "frm_AR_Order_Entry.frx":4A5F Style = 1 'Graphical TabIndex = 70 Top = 345 Visible = 0 'False Width = 375 End Begin VB.TextBox txtFieldsCust DataField = "AR ORDER Customer ID" Height = 285 Index = 0 Left = 1440 Locked = -1 'True TabIndex = 0 Top = 360 Width = 3360 End Begin VB.Label lblLabels Alignment = 1 'Right Justify Caption = "Address 1: " Height = 255 Index = 8 Left = 240 TabIndex = 83 Top = 1080 Width = 1215 End Begin VB.Label lblLabels Alignment = 1 'Right Justify Caption = "Address 2: " Height = 255 Index = 9 Left = 240 TabIndex = 82 Top = 1440 Width = 1215 End Begin VB.Label lblLabels Alignment = 1 'Right Justify Caption = "City,State,Zip: " Height = 255 Index = 10 Left = 60 TabIndex = 81 Top = 1800 Width = 1395 End Begin VB.Label lblLabels Alignment = 1 'Right Justify Caption = "Country: " Height = 255 Index = 13 Left = 255 TabIndex = 80 Top = 2160 Width = 1215 End Begin VB.Label lblLabels Alignment = 1 'Right Justify Caption = "Bill To: " Height = 255 Index = 6 Left = 240 TabIndex = 79 Top = 720 Width = 1215 End Begin VB.Label lblLabels Alignment = 1 'Right Justify Caption = "Ship To ID: " Height = 255 Index = 0 Left = 6360 TabIndex = 78 Top = 720 Width = 1215 End Begin VB.Label lblLabels Alignment = 1 'Right Justify Caption = "Country: " Height = 255 Index = 1 Left = 6375 TabIndex = 77 Top = 2160 Width = 1215 End Begin VB.Label lblLabels Alignment = 1 'Right Justify Caption = "City,State,Zip: " Height = 255 Index = 7 Left = 5685 TabIndex = 76 Top = 1800 Width = 1890 End Begin VB.Label lblLabels Alignment = 1 'Right Justify Caption = "Address 2: " Height = 255 Index = 11 Left = 6360 TabIndex = 75 Top = 1440 Width = 1215 End Begin VB.Label lblLabels Alignment = 1 'Right Justify Caption = "Address 1: " Height = 255 Index = 12 Left = 6360 TabIndex = 74 Top = 1080 Width = 1215 End Begin VB.Label lblfields Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Customer ID: " Height = 195 Index = 0 Left = 510 TabIndex = 73 Top = 360 Width = 960 End Begin VB.Label lblLabels Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Shipping ID: " Height = 195 Index = 30 Left = 6660 TabIndex = 72 Top = 360 Width = 915 End End Begin VB.Frame frSecond Height = 855 Left = 0 TabIndex = 64 Top = 2640 Width = 11535 Begin VB.TextBox txtFieldsCust DataField = "AR ORDER Tax Group" Enabled = 0 'False Height = 240 Index = 9 Left = 5835 TabIndex = 128 Top = 150 Visible = 0 'False Width = 210 End Begin VB.TextBox txtFieldsCust DataField = "AR ORDER Salesperson" Enabled = 0 'False Height = 240 Index = 8 Left = 2115 TabIndex = 127 Top = 165 Visible = 0 'False Width = 150 End Begin VB.CommandButton cmdUpdatedua Height = 375 Index = 244 Left = 5295 Picture = "frm_AR_Order_Entry.frx":4BA9 Style = 1 'Graphical TabIndex = 108 ToolTipText = "Update the Salesperson" Top = 375 Width = 405 End Begin VB.ComboBox cbPurchase Height = 315 Index = 244 Left = 2085 TabIndex = 107 Text = "cbPurchase" Top = 405 Width = 3240 End Begin VB.CommandButton cmdUpdatedua Height = 375 Index = 1 Left = 9015 Picture = "frm_AR_Order_Entry.frx":505F Style = 1 'Graphical TabIndex = 104 ToolTipText = "Update the Sales Tax" Top = 375 Width = 375 End Begin VB.CommandButton cmdUpdatedua Height = 360 Index = 5 Left = 10995 Picture = "frm_AR_Order_Entry.frx":5515 Style = 1 'Graphical TabIndex = 103 ToolTipText = "Update the Payment Terms" Top = 375 Width = 375 End Begin VB.CommandButton cmdUpdatedua Height = 360 Index = 2 Left = 1575 Picture = "frm_AR_Order_Entry.frx":59CB Style = 1 'Graphical TabIndex = 102 ToolTipText = "Update the Ship Via" Top = 390 Width = 405 End Begin VB.ComboBox cbPurchase Height = 315 Index = 3 ItemData = "frm_AR_Order_Entry.frx":5E81 Left = 5820 List = "frm_AR_Order_Entry.frx":5E83 TabIndex = 18 Text = "cbPurchase" Top = 405 Width = 3240 End Begin VB.ComboBox cbPurchase DataField = "AR ORDER Payment Terms" Height = 315 Index = 5 ItemData = "frm_AR_Order_Entry.frx":5E85 Left = 9510 List = "frm_AR_Order_Entry.frx":5E87 TabIndex = 17 Text = "cbPurchase" Top = 405 Width = 1500 End Begin VB.ComboBox cbPurchase DataField = "AR ORDER Shipping Method" Height = 315 Index = 2 Left = 105 TabIndex = 16 Text = "cbPurchase" Top = 405 Width = 1500 End Begin VB.Label lblfields Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H80000004& Caption = "Ship Via" ForeColor = &H80000008& Height = 255 Index = 2 Left = 90 TabIndex = 68 Top = 165 Width = 1860 End Begin VB.Label lblfields Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H80000000& Caption = "Salesperson" ForeColor = &H80000008& Height = 255 Index = 244 Left = 2085 TabIndex = 67 Top = 180 Width = 3615 End Begin VB.Label lblfields Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H80000000& Caption = "Payment Terms" ForeColor = &H80000008& Height = 255 Index = 5 Left = 9510 TabIndex = 66 Top = 180 Width = 1890 End Begin VB.Label lblfields Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H80000000& Caption = "Sales Tax" ForeColor = &H80000008& Height = 255 Index = 3 Left = 5805 TabIndex = 65 Top = 180 Width = 3600 End End Begin MSDataGridLib.DataGrid grdDataGrid Height = 2265 Left = 30 TabIndex = 84 Top = 3600 Width = 11400 _ExtentX = 20108 _ExtentY = 3995 _Version = 393216 AllowUpdate = 0 'False AllowArrows = -1 'True BackColor = 11594218 HeadLines = 1 RowHeight = 15 TabAction = 2 WrapCellPointer = -1 'True FormatLocked = -1 'True AllowDelete = -1 'True BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "Tahoma" Size = 8.25 Charset = 238 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "Tahoma" Size = 8.25 Charset = 238 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ColumnCount = 11 BeginProperty Column00 DataField = "AR ORDERD Item Id" Caption = "Item ID" BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} Type = 0 Format = "" HaveTrueFalseNull= 0 FirstDayOfWeek = 0 FirstWeekOfYear = 0 LCID = 1033 SubFormatType = 0 EndProperty EndProperty BeginProperty Column01 DataField = "AR ORDERD Description" Caption = "Item Desc." BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} Type = 0 Format = "" HaveTrueFalseNull= 0 FirstDayOfWeek = 0 FirstWeekOfYear = 0 LCID = 1033 SubFormatType = 0 EndProperty EndProperty BeginProperty Column02 DataField = "AR ORDERD Qty" Caption = "Order Qty" BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} Type = 1 Format = "0" HaveTrueFalseNull= 0 FirstDayOfWeek = 0 FirstWeekOfYear = 0 LCID = 1033 SubFormatType = 0 EndProperty EndProperty BeginProperty Column03 DataField = "AR ORDERD Qty To Invoice" Caption = "Invoice Qty" BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} Type = 1 Format = "0" HaveTrueFalseNull= 0 FirstDayOfWeek = 0 FirstWeekOfYear = 0 LCID = 1033 SubFormatType = 0 EndProperty EndProperty BeginProperty Column04 DataField = "AR ORDERD Units" Caption = "Units" BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} Type = 0 Format = """$""#,##0.00" HaveTrueFalseNull= 0 FirstDayOfWeek = 0 FirstWeekOfYear = 0 LCID = 1033 SubFormatType = 0 EndProperty EndProperty BeginProperty Column05 DataField = "AR ORDERD Unit Price" Caption = "Unit Price" BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} Type = 1 Format = """$""#,##0.00" HaveTrueFalseNull= 0 FirstDayOfWeek = 0 FirstWeekOfYear = 0 LCID = 1033 SubFormatType = 0 EndProperty EndProperty BeginProperty Column06 DataField = "AR ORDERD Discount %" Caption = "Disc %" BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} Type = 1 Format = "0.00" HaveTrueFalseNull= 0 FirstDayOfWeek = 0 FirstWeekOfYear = 0 LCID = 1033 SubFormatType = 0 EndProperty EndProperty BeginProperty Column07 DataField = "AR ORDERD Tax" Caption = "Tax" BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} Type = 5 Format = "0.000E+00" HaveTrueFalseNull= 1 TrueValue = "Yes" FalseValue = "No" NullValue = "NA" FirstDayOfWeek = 0 FirstWeekOfYear = 0 LCID = 1033 SubFormatType = 0 EndProperty EndProperty BeginProperty Column08 DataField = "AR ORDERD Item Total" Caption = "Total" BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} Type = 1 Format = """$""#,##0.00" HaveTrueFalseNull= 0 FirstDayOfWeek = 0 FirstWeekOfYear = 0 LCID = 1033 SubFormatType = 0 EndProperty EndProperty BeginProperty Column09 DataField = "AR ORDERD Posting Account" Caption = "GL Account" BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} Type = 0 Format = "" HaveTrueFalseNull= 0 FirstDayOfWeek = 0 FirstWeekOfYear = 0 LCID = 1033 SubFormatType = 0 EndProperty EndProperty BeginProperty Column10 DataField = "AR ORDERD Project" Caption = "Project" BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} Type = 0 Format = "" HaveTrueFalseNull= 0 FirstDayOfWeek = 0 FirstWeekOfYear = 0 LCID = 1033 SubFormatType = 0 EndProperty EndProperty SplitCount = 1 BeginProperty Split0 ScrollBars = 3 BeginProperty Column00 EndProperty BeginProperty Column01 EndProperty BeginProperty Column02 Alignment = 2 EndProperty BeginProperty Column03 Alignment = 2 EndProperty BeginProperty Column04 EndProperty BeginProperty Column05 EndProperty BeginProperty Column06 EndProperty BeginProperty Column07 Button = -1 'True EndProperty BeginProperty Column08 EndProperty BeginProperty Column09 EndProperty BeginProperty Column10 EndProperty EndProperty End End Begin VB.PictureBox picStatBox Align = 2 'Align Bottom Appearance = 0 'Flat BorderStyle = 0 'None ForeColor = &H80000008& Height = 300 Left = 0 ScaleHeight = 300 ScaleWidth = 15240 TabIndex = 55 Top = 8295 Width = 15240 Begin VB.CommandButton cmdLast Height = 300 Left = 4545 Picture = "frm_AR_Order_Entry.frx":5E89 Style = 1 'Graphical TabIndex = 33 Top = 0 UseMaskColor = -1 'True Width = 345 End Begin VB.CommandButton cmdNext Height = 300 Left = 4200 Picture = "frm_AR_Order_Entry.frx":61CB Style = 1 'Graphical TabIndex = 32 Top = 0 UseMaskColor = -1 'True Width = 345 End Begin VB.CommandButton cmdPrevious Height = 300 Left = 345 Picture = "frm_AR_Order_Entry.frx":650D Style = 1 'Graphical TabIndex = 30 Top = 0 UseMaskColor = -1 'True Width = 345 End Begin VB.CommandButton cmdFirst Height = 300 Left = 0 Picture = "frm_AR_Order_Entry.frx":684F Style = 1 'Graphical TabIndex = 29 Top = 0 UseMaskColor = -1 'True Width = 345 End Begin VB.Label lblStatus BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Height = 285 Left = 690 TabIndex = 31 Top = 0 Width = 3360 End End Begin VB.PictureBox PicReport Align = 2 'Align Bottom Appearance = 0 'Flat BackColor = &H80000000& BorderStyle = 0 'None ForeColor = &H80000008& Height = 2055 Left = 0 ScaleHeight = 2055 ScaleWidth = 15240 TabIndex = 53 Top = 6240 Width = 15240 Begin VB.CommandButton cmdCalculation Caption = "Calculation" Height = 390 Left = 7170 TabIndex = 131 ToolTipText = "Calculation/Refresh after change Discount Percent,Tax Freight,Freight " Top = 1635 Width = 1305 End Begin VB.CommandButton cmdCancel Caption = "Canc&el" Height = 300 Left = 6945 TabIndex = 114 Top = 1725 Visible = 0 'False Width = 1350 End Begin VB.CommandButton cmdClose Caption = "&Close" Height = 300 Left = 5580 TabIndex = 113 Top = 1725 Width = 1350 End Begin VB.CommandButton cmdRefresh Caption = "&Refresh" Height = 300 Left = 2865 TabIndex = 112 Top = 1725 Width = 1350 End Begin VB.CommandButton cmdDelete Caption = "&Delete" Height = 300 Left = 4215 TabIndex = 111 Top = 1725 Width = 1350 End Begin VB.CommandButton cmdUpdate Caption = "&Update" Height = 300 Left = 1500 TabIndex = 110 Top = 1725 Width = 1350 End Begin VB.CommandButton cmdAdd Caption = "&Add" Height = 300 Left = 135 TabIndex = 109 Top = 1725 Width = 1350 End Begin VB.Frame frTotal BorderStyle = 0 'None Height = 2055 Left = 7680 TabIndex = 97 Top = 0 Width = 3855 Begin VB.TextBox txtfields DataField = "AR ORDER Total" BeginProperty DataFormat Type = 1 Format = """$""#,##0.00" HaveTrueFalseNull= 0 FirstDayOfWeek = 0 FirstWeekOfYear = 0 LCID = 1033 SubFormatType = 2 EndProperty Height = 285 Index = 30 Left = 1560 Locked = -1 'True TabIndex = 28 Top = 1680 Width = 2055 End Begin VB.TextBox txtfields DataField = "AR ORDER Tax Percent" BeginProperty DataFormat Type = 1 Format = "0.00" HaveTrueFalseNull= 0 FirstDayOfWeek = 0 FirstWeekOfYear = 0 LCID = 1033 SubFormatType = 1 EndProperty Height = 285 Index = 29 Left = 1560 Locked = -1 'True TabIndex = 24 Top = 960 Width = 495 End Begin VB.TextBox txtfields DataField = "AR ORDER Discount Percent" BeginProperty DataFormat Type = 1 Format = "0.00" HaveTrueFalseNull= 0 FirstDayOfWeek = 0 FirstWeekOfYear = 0 LCID = 1033 SubFormatType = 1 EndProperty Height = 285 Index = 28 Left = 1575 TabIndex = 22 Top = 600 Width = 495 End Begin VB.TextBox txtfields DataField = "AR ORDER Freight" BeginProperty DataFormat Type = 1 Format = """$""#,##0.00" HaveTrueFalseNull= 0 FirstDayOfWeek = 0 FirstWeekOfYear = 0 LCID = 1033 SubFormatType = 2 EndProperty Height = 285 Index = 27 Left = 2175 TabIndex = 27 Top = 1320 Width = 1455 End Begin VB.TextBox txtfields DataField = "AR ORDER Sales Tax" BeginProperty DataFormat Type = 1 Format = """$""#,##0.00" HaveTrueFalseNull= 0 FirstDayOfWeek = 0 FirstWeekOfYear = 0 LCID = 1033 SubFormatType = 2 EndProperty Height = 285 Index = 26 Left = 2160 Locked = -1 'True TabIndex = 25 Top = 960 Width = 1455 End Begin VB.TextBox txtfields DataField = "AR ORDER Discount Amount" BeginProperty DataFormat Type = 1 Format = """$""#,##0.00" HaveTrueFalseNull= 0 FirstDayOfWeek = 0 FirstWeekOfYear = 0 LCID = 1033 SubFormatType = 2 EndProperty Height = 285 Index = 25 Left = 2160 Locked = -1 'True TabIndex = 23 Top = 600 Width = 1455 End Begin VB.TextBox txtfields DataField = "AR ORDER Subtotal" BeginProperty DataFormat Type = 1 Format = """$""#,##0.00" HaveTrueFalseNull= 0 FirstDayOfWeek = 0 FirstWeekOfYear = 0 LCID = 1033 SubFormatType = 2 EndProperty Height = 285 Index = 24 Left = 1560 Locked = -1 'True TabIndex = 21 Top = 240 Width = 2055 End Begin VB.CheckBox chkTaxFreight Alignment = 1 'Right Justify Caption = "Tax Freight?" DataField = "AR ORDER Tax Freight" Height = 255 Left = 0 TabIndex = 26 Top = 1320 Width = 1290 End Begin VB.Label lblLabels Alignment = 1 'Right Justify Caption = "Freight:" Height = 255 Index = 5 Left = 1320 TabIndex = 134 Top = 1320 Width = 810 End Begin VB.Label lblLabels Alignment = 1 'Right Justify Caption = "Total: " Height = 255 Index = 25 Left = 660 TabIndex = 101 Top = 1710 Width = 930 End Begin VB.Label lblLabels Alignment = 1 'Right Justify Caption = "Sales Tax: " Height = 255 Index = 23 Left = 60 TabIndex = 100 Top = 960 Width = 1500 End Begin VB.Label lblLabels Alignment = 1 'Right Justify Caption = "Discount: " Height = 255 Index = 22 Left = 60 TabIndex = 99 Top = 600 Width = 1500 End Begin VB.Label lblLabels Alignment = 1 'Right Justify Caption = "Sub Total: " Height = 255 Index = 21 Left = 60 TabIndex = 98 Top = 255 Width = 1545 End End Begin VB.TextBox txtfields DataField = "AR ORDER Document Type" Height = 285 Index = 3 Left = 13305 Locked = -1 'True TabIndex = 50 Top = 240 Width = 1095 End Begin VB.TextBox txtfields DataField = "AR ORDER Document #" Height = 285 Index = 2 Left = 11640 Locked = -1 'True TabIndex = 51 Top = 900 Width = 1095 End Begin VB.TextBox txtfields DataField = "AR ORDER Taxable Subtotal" BeginProperty DataFormat Type = 1 Format = """$""#,##0.00" HaveTrueFalseNull= 0 FirstDayOfWeek = 0 FirstWeekOfYear = 0 LCID = 1033 SubFormatType = 2 EndProperty Height = 285 Index = 59 Left = 11955 TabIndex = 49 Top = 255 Width = 1095 End Begin VB.TextBox txtfields DataField = "AR ORDER Description" Height = 1305 Index = 32 Left = 135 MultiLine = -1 'True ScrollBars = 2 'Vertical TabIndex = 19 Top = 285 Width = 6705 End Begin VB.CommandButton cmdLineItemForm Caption = "View Line Items Form" Height = 375 Left = 465 TabIndex = 20 Top = 930 Width = 4575 End Begin VB.Label Label1 Caption = " Taxable Subtotal" Height = 255 Left = 11880 TabIndex = 59 Top = 0 Width = 1335 End Begin VB.Label lblLabels Caption = "Document Type:" Height = 255 Index = 4 Left = 13320 TabIndex = 58 Top = 0 Width = 1335 End Begin VB.Label lblLabels Caption = "Document #:" Height = 255 Index = 3 Left = 11880 TabIndex = 57 Top = 600 Width = 975 End Begin VB.Label lblLabels Alignment = 2 'Center Caption = "Description" Height = 255 Index = 20 Left = 150 TabIndex = 54 Top = 30 Width = 6420 End End Attribute VB_Name = "frm_AR_Order_Entry" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False ''{*********************************************************** ''-TITLE: AR_Order_Entry ''-MODULE ID: 1.139 ''-PURPOSE: This module displays frm_AR_Order_Entry ''-USAGE: frm_AR_Order_Entry ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This module returns no values ''-CALLS: This module calls no other modules ''-CALLED BY: AR_Order_Entry ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************} Option Explicit Dim WithEvents adoPrimaryRS As ADODB.Recordset Attribute adoPrimaryRS.VB_VarHelpID = -1 Dim mbChangedByCode As Boolean Dim mvBookMark As Variant Dim mbEditFlag As Boolean Dim mbAddNewFlag As Boolean Dim mbDataChanged As Boolean Dim db As ADODB.Connection Dim NewLoad As Boolean Public grdOnAddNew As Boolean Dim strNo As String Dim NumberDoc As String
Private Declare Function GetCurrentDirectory Lib "kernel32" Alias "GetCurrentDirectoryA" (ByVal nBufferLength As Long, ByVal lpbuffer As String) As Long Table of Contents ''{*********************************************************** ''-TITLE: AR_ORDER_Customer_ID_AfterUpdate() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays AR_ORDER_Customer_ID_AfterUpdate() ''-USAGE: AR_ORDER_Customer_ID_AfterUpdate() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: CalcSalesTaxPercent, LogError ''-CALLED BY: AR_ORDER_Customer_ID_AfterUpdate; frm_AR_Order_Entry.cmdLookupAdd_Click; frm_AR_Quote_Entry.cmdLookupAdd_Click ''-TABLES/FIELDS USED: [AR Customer] [EMP Employees] [SYS Tax Group] /All or Any of the Fields ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: rs, rsEmp, rsTax ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub AR_ORDER_Customer_ID_AfterUpdate() Table of Contents Dim rs As Recordset Set rs = New Recordset rs.Open "SELECT * FROM [AR Customer] where [AR CUST Customer ID] = '" & txtFieldsCust(0) & "'", db, adOpenStatic, adLockOptimistic, adCmdText On Error Resume Next rs.MoveFirst If Err <> 0 Then MsgBox "Customer not found." adoPrimaryRS![AR ORDER Customer ID] = Null Exit Sub End If adoPrimaryRS![AR ORDER Salesperson] = IIf(IsNull(rs("AR CUST Salesperson")), "", rs("AR CUST Salesperson")) adoPrimaryRS![AR ORDER Payment Terms] = IIf(IsNull(rs("AR CUST Payment Terms")), "", rs("AR CUST Payment Terms")) adoPrimaryRS![AR ORDER Tax Group] = IIf(IsNull(rs("AR CUST Tax Group")), "", rs("AR CUST Tax Group")) adoPrimaryRS![AR ORDER Discount Percent] = IIf(IsNull(rs("AR CUST Discount %")), 0, rs("AR CUST Discount %")) If adoPrimaryRS.EditMode <> adEditNone Then cbPurchase(244).Text = IIf(IsNull(rs("AR CUST Salesperson")), "", rs("AR CUST Salesperson")) Dim rsEmp As New Recordset rsEmp.Open "SELECT [EMP NAME] FROM [EMP Employees] WHERE [EMP ID]='" & cbPurchase(244).Text & "'", db, adOpenKeyset, adLockOptimistic cbPurchase(244).Text = cbPurchase(244).Text & IIf(IsNull(rsEmp("EMP Name")), "", " : " & rsEmp("EMP Name")) Set rsEmp = Nothing Dim rsTax As New Recordset rsTax.Open "SELECT [SYS TAXGRP ID],[SYS TAXGRP Name] FROM [SYS Tax Group] WHERE [SYS TAXGRP Name]='" & txtFieldsCust(9).Text & "'", db, adOpenKeyset, adLockOptimistic cbPurchase(3).Text = IIf(IsNull(rsTax("SYS TAXGRP ID")), "", rsTax("SYS TAXGRP ID")) & IIf(IsNull(rsTax("SYS TAXGRP Name")), "", " : " & rsTax("SYS TAXGRP Name")) cbPurchase(2).Text = DLookup("[SYS COM Sales Shipping Method]", "[SYS COMPANY]") txtFields(35).Text = DLookup("[SYS COM Sales Cash Acct]", "[SYS COMPANY]") cbPurchase_Click 3 End If txtFieldsCust(8).Text = adoPrimaryRS![AR ORDER Salesperson] cbPurchase(5) = adoPrimaryRS![AR ORDER Payment Terms] txtFieldsCust(9).Text = adoPrimaryRS![AR ORDER Tax Group] txtFields(28).Text = adoPrimaryRS![AR ORDER Discount Percent] Call CalcSalesTaxPercent Exit Sub AR_ORDER_Customer_ID_AfterUpdate_Error: Call LogError("Order Transactions", "AR_ORDER_Customer_ID_AfterUpdate", Now, Err, Error, True) Resume Next End Sub ''{*********************************************************** ''-TITLE: OpenDB ''-MODULE ID: 1.139 ''-PURPOSE: This procedure opens db ''-USAGE: OpenDB(SQLstatement As String) ''-INPUT ASSERTION: SQLstatement As String ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: OpenDB; frm_AP_Receiving_Entry.Form_Load; frm_AP_Receiving_Entry.RefreshDB; frm_AP_Receiving_Entry.cmdDelete_Click; frm_AP_RMA_Entry.Form_Load; frm_AP_RMA_Entry.RefreshDB; frm_AP_RMA_Entry.cmdDelete_Click; frm_AP_Voucher_Entry.Form_Load; frm_AP_Voucher_Entry.RefreshDB; frm_AP_Voucher_Entry.cmdDelete_Click; frm_AR_Order_Entry.Form_Load; frm_AR_Order_Entry.RefreshDB; frm_AR_Order_Entry.cmdDelete_Click; frm_AR_Order_Entry.optOrderType_Click; frm_AR_Order_Entry.optOrderType_Click; frm_AR_Return_Entry.Form_Load; frm_AR_Return_Entry.RefreshDB; frm_AR_Return_Entry.cmdDelete_Click; frm_AR_Sales_Memo_Entry.RefreshDB; frm_AR_Sales_Memo_Entry.Form_Load; frm_AR_Sales_Memo_Entry.cmdDelete_Click; frm_Pay_Employees.CalcPayroll; frm_Pay_Employees.Combo1_Click; frm_Pay_Employees.Combo2_Click; frm_Pay_Employees.Form_Load; frm_Pay_Employees.cmdCreatePayroll_Click; frm_AP_Purchase_Entry.Form_Load; frm_AP_Purchase_Entry.RefreshDB; frm_AP_Purchase_Entry.cmdDelete_Click; frm_AR_Sales_Entry.Fo ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ctrl ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub OpenDB(SQLstatement As String) Table of Contents NewLoad = True Set adoPrimaryRS = New Recordset adoPrimaryRS.Open SQLstatement, db, adOpenStatic, adLockOptimistic, adCmdText Dim ctrl As Control For Each ctrl In Me.Controls If TypeOf ctrl Is TextBox Or TypeOf ctrl Is CheckBox Or TypeOf ctrl Is ComboBox Then Set ctrl.DataSource = adoPrimaryRS If TypeOf ctrl Is TextBox And ctrl.DataField <> "" Then If adoPrimaryRS("" & ctrl.DataField & "").Type = 202 Then ctrl.MaxLength = adoPrimaryRS("" & ctrl.DataField & "").DefinedSize End If End If End If Next LoadCombo "semua" NewLoad = False End Sub ''{*********************************************************** ''-TITLE: CheckCreditLimit ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays CheckCreditLimit ''-USAGE: CheckCreditLimit(CurrentRequest As Currency) ''-INPUT ASSERTION: CurrentRequest As Currency ''-OUTPUT ASSERTION: Boolean ''-CALLS: This procedure calls no other functions ''-CALLED BY: CheckCreditLimit; frm_AR_Order_Entry.cmdCreateInvoice_Click; frm_AR_Sales_Memo_Entry.cmdPostInvoice_Click; frm_AR_Sales_Entry.cmdPostInvoice_Click ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: Limit#, CurrentBalance#, Response% ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Function CheckCreditLimit(CurrentRequest As Currency) As Boolean Table of Contents Dim Limit# Dim CurrentBalance# Dim Response% Limit# = DLookup("[AR CUST Credit Limit]", "[AR Customer]", "[AR CUST Customer ID] = '" & txtFieldsCust(0) & "'") If Limit# > 0 Then CurrentBalance# = DLookup("[AR CUST Financial Period 1]", "[AR Customer]", "[AR CUST Customer ID] = '" & txtFieldsCust(0) & "'") CurrentBalance# = CurrentBalance# + CurrentRequest If CurrentBalance# > Limit# Then Response% = MsgBox("New balance will exceed customers credit limit!" & vbCr & "Credit Limit : " & format(Limit#, "$###,###,###.00") & vbCr & "Previous Balance : " & format(CurrentBalance# - CurrentRequest, "$###,###,###.00") & vbCr & "New Request : " & CurrentRequest & vbCr & "Current Balance : " & format(CurrentBalance#, "$###,###,###.00") & vbCr & vbCr & "Would you like to Continue?", vbYesNo, "Integral Accounting") If Response% = vbNo Then CheckCreditLimit = False Exit Function End If End If End If CheckCreditLimit = True End Function ''{*********************************************************** ''-TITLE: Datavalidate() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays Datavalidate() ''-USAGE: Datavalidate() ''-INPUT ASSERTION: ''-OUTPUT ASSERTION: Boolean ''-CALLS: This procedure calls no other functions ''-CALLED BY: Datavalidate; frm_AP_Receiving_Entry.cmdPost_Click; frm_AP_RMA_Entry.cmdPost_Click; frm_AP_Voucher_Entry.cmdPost_Click; frm_AR_Order_Entry.cmdCreateInvoice_Click; frm_AR_Return_Entry.cmdPostInvoice_Click; frm_AR_Sales_Memo_Entry.cmdPostInvoice_Click; frm_AR_Sales_Entry.cmdPostInvoice_Click; frm_AP_Credit_Entry.cmdPost_Click; frm_AR_Credit_Entry.cmdPostInvoice_Click; frm_AP_Cash_Payments.cmdPost_Click; frm_AP_Cash_Payments.cmdApply_Click; frm_AR_Cash_Receipts.cmdApply_Click; frm_INV_Production.Datavalidate%; frm_INV_Production.cmdPost_Click; frm_INV_Adjust.Datavalidate%; frm_INV_Adjust.cmdPost_Click; frm_GL_Entry.Datavalidate%; frm_GL_Entry.cmdPost_Click; frm_GL_Entry.cmdPost_Click; frm_AR_Batch_Posting.cmdPost_Click ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Function Datavalidate() As Boolean Table of Contents If txtFields(36) > 0 Then If txtFields(35) = "" Then MsgBox "Please enter a bank account!", , "Error" Datavalidate = False Exit Function End If End If If DCount("[AR ORDERD Item ID]", "[AR Order Detail]", "[AR ORDERD Document #] = " & txtFields(2)) <= 0 Then MsgBox "Must have at least one inventory item!", , "Error" Datavalidate = False Exit Function End If If txtFields(36) > 0 Then If txtFields(33) < 0 Then MsgBox "Amount paid cannot exceed invoice total!", , "Error" Datavalidate = False Exit Function End If If Trim(txtFields(34)) = "" Then MsgBox "You must enter a check number!", , "Error" Datavalidate = False Exit Function End If End If Datavalidate = True Exit Function End Function ''{*********************************************************** ''-TITLE: adoPrimaryRS_RecordChangeComplete ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays adoPrimaryRS_RecordChangeComplete ''-USAGE: adoPrimaryRS_RecordChangeComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal cRecords As Long, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset) ''-INPUT ASSERTION: ByVal adReason As ADODB.EventReasonEnum, ByVal cRecords As Long, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: adoPrimaryRS_RecordChangeComplete ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub adoPrimaryRS_RecordChangeComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal cRecords As Long, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset) Table of Contents Select Case adReason Case adRsnAddNew Case adRsnClose Case adRsnDelete Case adRsnFirstChange Case adRsnMove Case adRsnRequery Case adRsnResynch Case adRsnUndoAddNew Case adRsnUndoDelete Case adRsnUndoUpdate Case adRsnUpdate End Select End Sub ''{*********************************************************** ''-TITLE: cbPurchase_Click ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays cbPurchase_Click ''-USAGE: cbPurchase_Click(Index As Integer) ''-INPUT ASSERTION: Index As Integer ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: cbPurchase_Click; frm_AR_Order_Entry.AR_ORDER_Customer_ID_AfterUpdate; frm_AR_Return_Entry.AR_SALE_Customer_ID_AfterUpdate; frm_AR_Sales_Memo_Entry.AR_SALE_Customer_ID_AfterUpdate; frm_AR_Sales_Entry.AR_SALE_Customer_ID_AfterUpdate; frm_AR_Credit_Entry.AR_SALE_Customer_ID_AfterUpdate; frm_AR_Quote_Entry.AR_ORDER_Customer_ID_AfterUpdate; frm_AR_Order_Entry.AR_ORDER_Customer_ID_AfterUpdate ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: n, st ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub cbPurchase_Click(Index As Integer) Table of Contents Dim n As Integer Dim st As String Select Case Index Case 5 '---->>>date If mbAddNewFlag = True Then SetDueDate End If Case 3 '---->>> Tax Group If cbPurchase(3) = "" Then Else n = InStr(cbPurchase(3).Text, " : ") st = Left(cbPurchase(3).Text, n - 1) txtFieldsCust(9) = st adoPrimaryRS("AR ORDER Tax Group") = st End If Case 244 '--->>> Salesperson If cbPurchase(244) = "" Then Else n = InStr(cbPurchase(244).Text, " : ") st = Left(cbPurchase(244).Text, n - 1) txtFieldsCust(8) = st adoPrimaryRS("AR ORDER Salesperson") = st End If End Select Select Case Index Case 3 If cbPurchase(3) = "" Then txtFields(29) = 0 Else CalcSalesTaxPercent End If End Select End Sub ''{*********************************************************** ''-TITLE: cbPurchase_KeyPress ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays cbPurchase_KeyPress ''-USAGE: cbPurchase_KeyPress(Index As Integer, KeyAscii As Integer) ''-INPUT ASSERTION: Index As Integer, KeyAscii As Integer ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: cbPurchase_KeyPress ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: keyResponse ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub cbPurchase_KeyPress(Index As Integer, KeyAscii As Integer) Table of Contents Dim keyResponse As Boolean keyResponse = CtrlValidate(KeyAscii, "") If keyResponse = True Then Else KeyAscii = 0 End If End Sub ''{*********************************************************** ''-TITLE: cbPurchase_LostFocus ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays cbPurchase_LostFocus ''-USAGE: cbPurchase_LostFocus(Index As Integer) ''-INPUT ASSERTION: Index As Integer ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: cbPurchase_LostFocus ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub cbPurchase_LostFocus(Index As Integer) Table of Contents If CheckCombo(cbPurchase(Index)) Then MsgBox "There is no such selection", vbInformation, "Information" End If End Sub ''{*********************************************************** ''-TITLE: cmdAddNewCust_Click() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays cmdAddNewCust_Click() ''-USAGE: cmdAddNewCust_Click() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: cmdAddNewCust_Click ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub cmdAddNewCust_Click() Table of Contents frm_AR_Customer.Show vbModal End Sub ''{*********************************************************** ''-TITLE: cmdCalculation_Click() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays cmdCalculation_Click() ''-USAGE: cmdCalculation_Click() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: cmdCalculation_Click ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub cmdCalculation_Click() Table of Contents CalcTotals End Sub ''{*********************************************************** ''-TITLE: cmdLookupCust_Click() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays cmdLookupCust_Click() ''-USAGE: cmdLookupCust_Click() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: cmdLookupCust_Click ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub cmdLookupCust_Click() Table of Contents frm_AR_CustomerID.OpenVendor adoPrimaryRS, 0, "AR ORDER", "AR ORDER", "Order" frm_AR_CustomerID.Show vbModal End Sub ''{*********************************************************** ''-TITLE: cmdLookupOrderDoc_Click() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays cmdLookupOrderDoc_Click() ''-USAGE: cmdLookupOrderDoc_Click() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: cmdLookupOrderDoc_Click ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub cmdLookupOrderDoc_Click() Table of Contents frm_LookupFind.OpenFind "Find Order Document", "Order Document", adoPrimaryRS, "AR ORDER Document #", "AR Order", "AR ORDER Ext Document #", "AR ORDER Document Type", "Order" frm_LookupFind.Show vbModal End Sub ''{*********************************************************** ''-TITLE: cmdLookupPurchaseOrder_Click() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays cmdLookupPurchaseOrder_Click() ''-USAGE: cmdLookupPurchaseOrder_Click() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: cmdLookupPurchaseOrder_Click ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub cmdLookupPurchaseOrder_Click() Table of Contents frm_LookupFind.OpenFind "Find Purchase Order", "Purchase Order", adoPrimaryRS, "AR ORDER Document #", "AR Order", "AR ORDER PO ID", "AR ORDER Document Type", "Order" frm_LookupFind.Show vbModal End Sub ''{*********************************************************** ''-TITLE: cmdPrint_Click() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays cmdPrint_Click() ''-USAGE: cmdPrint_Click() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: cmdPrint_Click; frm_CustStatements.BuildStatement ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub cmdPrint_Click() Table of Contents If cmdAdd.caption = "&Save" Then MsgBox "First save record!" Exit Sub Else adoPrimaryRS.UpdateBatch adAffectCurrent strNumber = txtFields(12) OpenReports "Order_entry.htm" End If End Sub ''{*********************************************************** ''-TITLE: cmdUpdatedua_Click ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays cmdUpdatedua_Click ''-USAGE: cmdUpdatedua_Click(Index As Integer) ''-INPUT ASSERTION: Index As Integer ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: cmdUpdatedua_Click ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub cmdUpdatedua_Click(Index As Integer) Table of Contents Select Case Index Case 1 LoadCombo "satu" CalcSalesTaxPercent Case 2 LoadCombo "dua" Case 3 LoadCombo "tiga" Case 5 LoadCombo "lima" Case 244 LoadCombo "loco" Case 15 LoadCombo "limabelas" Case 16 LoadCombo "enambelas" End Select End Sub ''{*********************************************************** ''-TITLE: Change_ComboBox ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays Change_ComboBox ''-USAGE: Change_ComboBox(Index As Integer) ''-INPUT ASSERTION: Index As Integer ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: Change_ComboBox; frm_AP_Receiving_Entry.cmdRefresh_Click; frm_AP_Receiving_Entry.cmdCancel_Click; frm_AP_Receiving_Entry.cmdFirst_Click; frm_AP_Receiving_Entry.cmdLast_Click; frm_AP_Receiving_Entry.cmdNext_Click; frm_AP_Receiving_Entry.cmdPrevious_Click; frm_AP_RMA_Entry.cmdRefresh_Click; frm_AP_RMA_Entry.cmdFirst_Click; frm_AP_RMA_Entry.cmdLast_Click; frm_AP_RMA_Entry.cmdNext_Click; frm_AP_RMA_Entry.cmdPrevious_Click; frm_AP_Voucher_Entry.cmdRefresh_Click; frm_AP_Voucher_Entry.cmdCancel_Click; frm_AP_Voucher_Entry.cmdFirst_Click; frm_AP_Voucher_Entry.cmdLast_Click; frm_AP_Voucher_Entry.cmdNext_Click; frm_AP_Voucher_Entry.cmdPrevious_Click; frm_AR_Order_Entry.cmdRefresh_Click; frm_AR_Order_Entry.cmdRefresh_Click; frm_AR_Order_Entry.cmdCancel_Click; frm_AR_Order_Entry.cmdCancel_Click; frm_AR_Order_Entry.cmdFirst_Click; frm_AR_Order_Entry.cmdFirst_Click; frm_AR_Order_Entry.cmdLast_Click; frm_AR_Order_Entry.cmdLast_Click; frm_AR_Order_Entry.cmdNext_Click; frm_AR_Order_Entr ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: n, K, a, st ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub Change_ComboBox(Index As Integer) Table of Contents Dim n As Integer Dim K As Integer Dim a As Integer If Index = 3 Then a = 9 End If If Index = 244 Then a = 8 End If K = Len(txtFieldsCust(a)) Dim st As String For n = 0 To cbPurchase(Index).ListCount - 1 Step 1 st = Left(cbPurchase(Index).List(n), K) If st = txtFieldsCust(a) Then cbPurchase(Index).Text = cbPurchase(Index).List(n) Exit Sub End If End Sub ''{*********************************************************** ''-TITLE: set_ComboBox ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays set_ComboBox ''-USAGE: set_ComboBox(Index As Integer) ''-INPUT ASSERTION: Index As Integer ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: set_ComboBox; frm_AP_Receiving_Entry.LoadCombo; frm_AP_RMA_Entry.LoadCombo; frm_AP_RMA_Entry.LoadCombo; frm_AP_Voucher_Entry.LoadCombo; frm_AP_Voucher_Entry.LoadCombo; frm_AR_Order_Entry.LoadCombo; frm_AR_Order_Entry.LoadCombo; frm_AR_Order_Entry.LoadCombo; frm_AR_Order_Entry.LoadCombo; frm_AR_Order_Entry.LoadCombo; frm_AR_Return_Entry.LoadCombo; frm_AR_Return_Entry.LoadCombo; frm_AR_Return_Entry.LoadCombo; frm_AR_Return_Entry.LoadCombo; frm_AR_Sales_Memo_Entry.LoadCombo; frm_AR_Sales_Memo_Entry.LoadCombo; frm_AR_Sales_Memo_Entry.LoadCombo; frm_AR_Sales_Memo_Entry.LoadCombo; frm_AP_Purchase_Entry.LoadCombo; frm_AP_Purchase_Entry.LoadCombo; frm_AR_Sales_Entry.LoadCombo; frm_AR_Sales_Entry.LoadCombo; frm_AR_Sales_Entry.LoadCombo; frm_AR_Sales_Entry.LoadCombo; frm_AR_Sales_Entry.LoadCombo; frm_AR_Credit_Entry.LoadCombo; frm_AR_Credit_Entry.LoadCombo; frm_AR_Credit_Entry.LoadCombo; frm_AR_Credit_Entry.LoadCombo; frm_AR_Quote_Entry.LoadCombo; frm_AR_Quote_Entry.LoadCombo; fr ''-TABLES/FIELDS USED: "projARSales3", "projARSales4", /All or Any of the Fields ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: CBox, st, i ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub set_ComboBox(Index As Integer) Table of Contents Dim CBox As Recordset Dim st As String cbPurchase(Index).Clear Select Case Index Case 3 Set CBox = New Recordset CBox.Open "projARSales3", db, , , adCmdTable If CBox.RecordCount = 0 Then Else Dim i As Integer For i = 0 To CBox.RecordCount - 1 Step 1 st = CBox("SYS TAXGRP ID") & " : " & CBox("SYS TAXGRP Name") cbPurchase(3).AddItem st If CBox("SYS TAXGRP ID") = txtFieldsCust(9) Then cbPurchase(3).Text = st End If CBox.MoveNext Next CBox.Close End If Case 244 Set CBox = New Recordset CBox.Open "projARSales4", db, , , adCmdTable If CBox.RecordCount = 0 Then Else For i = 0 To CBox.RecordCount - 1 Step 1 st = CBox("EMP ID") & " : " & CBox("EMP Name") cbPurchase(244).AddItem st If CBox("EMP ID") = txtFieldsCust(8) Then cbPurchase(244).Text = st End If CBox.MoveNext Next CBox.Close End If End Select End Sub ''{*********************************************************** ''-TITLE: LoadCombo ''-MODULE ID: 1.139 ''-PURPOSE: This procedure loads combos ''-USAGE: LoadCombo(LoadTotype As String) ''-INPUT ASSERTION: LoadTotype As String ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: LoadCombo; frm_AP_Receiving_Entry.cmdUpdatedua_Click; frm_AP_Receiving_Entry.cmdUpdatedua_Click; frm_AP_Receiving_Entry.cmdUpdatedua_Click; frm_AP_Receiving_Entry.cmdUpdatedua_Click; frm_AP_Receiving_Entry.Form_Load; frm_AP_Receiving_Entry.OpenDB; frm_AP_Receiving_Entry.RefreshDB; frm_AP_RMA_Entry.cmdUpdatedua_Click; frm_AP_RMA_Entry.cmdUpdatedua_Click; frm_AP_RMA_Entry.cmdUpdatedua_Click; frm_AP_RMA_Entry.cmdUpdatedua_Click; frm_AP_RMA_Entry.Form_Load; frm_AP_RMA_Entry.OpenDB; frm_AP_RMA_Entry.RefreshDB; frm_AP_Voucher_Entry.cmdUpdatedua_Click; frm_AP_Voucher_Entry.cmdUpdatedua_Click; frm_AP_Voucher_Entry.cmdUpdatedua_Click; frm_AP_Voucher_Entry.cmdUpdatedua_Click; frm_AP_Voucher_Entry.Form_Load; frm_AP_Voucher_Entry.OpenDB; frm_AP_Voucher_Entry.RefreshDB; frm_AR_Order_Entry.OpenDB; frm_AR_Order_Entry.cmdUpdatedua_Click; frm_AR_Order_Entry.cmdUpdatedua_Click; frm_AR_Order_Entry.cmdUpdatedua_Click; frm_AR_Order_Entry.cmdUpdatedua_Click; frm_AR_Order_Entry.cmdUpdatedua_C ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub LoadCombo(LoadTotype As String) Table of Contents Select Case LoadTotype Case "satu" set_ComboBox 3 Case "dua" ComboInit cbPurchase(2), lblfields(2), "SELECT [LIST SHIP Method] FROM [LIST Shipping Methods]" Case "tiga" set_ComboBox 3 Case "lima" ComboInit cbPurchase(5), lblfields(5), "SELECT [LIST PAY Description] FROM [LIST Payment Terms]" Case "limabelas" ComboInit cbPurchase(15), lblfields(15), "SELECT [RECURR TYPE] FROM [RECUR_TYPE]" Case "enambelas" ComboInit cbPurchase(16), lblfields(16), "SELECT [LIST PAY Method] FROM [LIST Payment Methods]" Case "semua" set_ComboBox 3 set_ComboBox 244 ComboInit cbPurchase(2), lblfields(2), "SELECT [LIST SHIP Method] FROM [LIST Shipping Methods]" ComboInit cbPurchase(5), lblfields(5), "SELECT [LIST PAY Description] FROM [LIST Payment Terms]" ComboInit cbPurchase(15), lblfields(15), "SELECT [RECURR TYPE] FROM [RECUR_TYPE]" ComboInit cbPurchase(16), lblfields(16), "SELECT [LIST PAY Method] FROM [LIST Payment Methods]" Case "loco" set_ComboBox 244 End Select End Sub ''{*********************************************************** ''-TITLE: chkTaxFreight_Click() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays chkTaxFreight_Click() ''-USAGE: chkTaxFreight_Click() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: chkTaxFreight_Click ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub chkTaxFreight_Click() Table of Contents If chkTaxFreight.Value = 0 Then chkTaxFreight.caption = " No Shipping Tax" ElseIf chkTaxFreight.Value = 1 Then chkTaxFreight.caption = " Got Shipping Tax" End If End Sub ''{*********************************************************** ''-TITLE: cmdbankAccount_Click() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays cmdbankAccount_Click() ''-USAGE: cmdbankAccount_Click() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: cmdbankAccount_Click ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub cmdbankAccount_Click() Table of Contents frm_LookupBankAccount.OpenFind "Account Description", 2, "BANK ACCT ID", "BANK ACCT Name", "BANK Accounts", "select [BANK ACCT ID], [BANK ACCT Name] from [BANK Accounts]" frm_LookupBankAccount.Show vbModal Exit Sub End Sub ''{*********************************************************** ''-TITLE: cmdCreateInvoice_Click() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays cmdCreateInvoice_Click() ''-USAGE: cmdCreateInvoice_Click() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: RedoNumbers, LogError ''-CALLED BY: cmdCreateInvoice_Click; frm_AR_Order_Entry.cmdInvoiceBackOrder_Click; Sales_Module.CreateBackOrder ''-TABLES/FIELDS USED: [AR ORDER Detail] /All or Any of the Fields ''-TABLES/FIELDS AFFECTED: [AR Sales] /All or Any of the Fields ''-VARIABLES: DataB, iSuccess, iResponse, rsSales, rsSalesDetail, rsOrders, rsOrderDetail, rsOrderTracking, lSalesID, sExtDocument, iInvoiceCount, GetCost, AddInteger2, SProc, iBackOrdered ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub cmdCreateInvoice_Click() Table of Contents Dim DataB As Connection adoPrimaryRS.UpdateBatch adAffectCurrent On Error GoTo cmdCreateInvoice_Error ' cmdUpdate_Click If txtFields(24) = 0 Then MsgBox "No Item to sell... please select the product to sell", vbExclamation, "Error Invoice Creation" Exit Sub End If If txtFields(14) = "" Then MsgBox "You must specify a purchase order", vbExclamation, "Error Invoice Creation" Exit Sub End If If Not CheckEmpty Then Exit Sub End If If chkInvoiced.Value = 1 Then MsgBox "Duplicate Invoice is not allowed", vbExclamation, "Error Invoice Creation" Exit Sub End If If CheckCreditLimit(txtFields(33).Text) = False Then Exit Sub End If Dim iSuccess As Integer Dim iResponse As Integer iResponse = MsgBox("Are you sure you want to create an invoice from this order?", vbYesNo + vbQuestion, "Create Invoice") If iResponse = vbNo Then Exit Sub End If Screen.MousePointer = vbHourglass Set DataB = New Connection DataB.CursorLocation = adUseClient DataB.Open gblADOProvider Dim rsSales As Recordset Dim rsSalesDetail As Recordset Dim rsOrders As Recordset Dim rsOrderDetail As Recordset Dim rsOrderTracking As Recordset Set rsSales = New Recordset rsSales.Open ("Select * from [AR Sales]"), DataB, adOpenStatic, adLockOptimistic Set rsSalesDetail = New Recordset rsSalesDetail.Open ("[AR Sales Detail]"), DataB, adOpenStatic, adLockOptimistic Set rsOrderTracking = New Recordset rsOrderTracking.Open ("[AR Order Tracking]"), DataB, adOpenStatic, adLockOptimistic Set rsOrderDetail = New Recordset rsOrderDetail.Open ("SELECT * FROM [AR ORDER Detail] where [AR ORDERD Qty To Invoice] > 0 AND [AR ORDERD Document #] = " & txtFields(2)), DataB, adOpenStatic, adLockOptimistic If rsOrderDetail.RecordCount = 0 Then MsgBox "There is no quantity to invoice", vbCritical, "Error Creation" Screen.MousePointer = vbNormal Exit Sub End If rsOrderDetail.MoveFirst With adoPrimaryRS Set rsOrders = New Recordset rsOrders.Open ("[AR Order]"), DataB, adOpenStatic, adLockOptimistic rsOrders.MoveFirst rsOrders.Find "[AR ORDER Document #]=" & ![AR ORDER Document #] If rsOrders.EOF Then End If Dim lSalesID As Long Dim sExtDocument As String Dim iInvoiceCount As Integer iInvoiceCount = DCount("*", "[AR Order Tracking]", "[Order ID] = " & ![AR ORDER Document #]) Screen.MousePointer = vbHourglass FindDocument: If iInvoiceCount = 0 Then sExtDocument = ![AR ORDER Ext Document #] Else sExtDocument = ![AR ORDER Ext Document #] & "-" & Trim(CStr(iInvoiceCount)) End If rsSales.MoveFirst rsSales.Find "[AR SALE Ext Document #]='" & sExtDocument & "'" If rsSales.EOF Then Else iInvoiceCount = iInvoiceCount + 1 GoTo FindDocument End If With rsSales .AddNew ![AR SALE Ext Document #] = sExtDocument ![AR SALE Document Type] = "Invoice" ![AR SALE Saved YN] = False ![AR SALE Posted YN] = False ![AR SALE Service YN] = False ![AR SALE Date] = adoPrimaryRS![AR ORDER Date] ![AR SALE Due Date] = adoPrimaryRS![AR ORDER Due Date] ![AR SALE PO ID] = CStr(adoPrimaryRS![AR ORDER PO ID]) If Not (IsNull(Trim(adoPrimaryRS![AR ORDER Tax Exempt ID]))) Then ![AR SALE Tax Exempt ID] = CStr(adoPrimaryRS![AR ORDER Tax Exempt ID]) End If ![AR SALE Tax Group] = CStr(adoPrimaryRS![AR ORDER Tax Group]) ![AR SALE Customer ID] = CStr(adoPrimaryRS![AR ORDER Customer ID]) ![AR SALE Bill To] = CStr(adoPrimaryRS![AR ORDER Bill To]) & "" If Not (IsNull(Trim(adoPrimaryRS![AR ORDER Billing Customer]))) Then ![AR SALE Billing Customer] = CStr(adoPrimaryRS![AR ORDER Billing Customer]) End If ![AR SALE Billing Address 1] = CStr(adoPrimaryRS![AR ORDER Billing Address 1]) If Not (IsNull(Trim(adoPrimaryRS![AR ORDER Billing Address 2]))) Then ![AR SALE Billing Address 2] = CStr(adoPrimaryRS![AR ORDER Billing Address 2]) End If ![AR SALE Billing City] = CStr(adoPrimaryRS![AR ORDER Billing City]) ![AR SALE Billing State] = CStr(adoPrimaryRS![AR ORDER Billing State]) ![AR SALE Billing Postal] = CStr(adoPrimaryRS![AR ORDER Billing Postal]) ![AR SALE Billing Country] = CStr(adoPrimaryRS![AR ORDER Billing Country]) ![AR SALE Shipping Method] = CStr(adoPrimaryRS![AR ORDER Shipping Method]) ![AR SALE Ship Date] = adoPrimaryRS![AR ORDER Ship Date] ![AR SALE Shipping ID] = CStr(adoPrimaryRS![AR ORDER Shipping ID]) If Not (IsNull(Trim(adoPrimaryRS![AR ORDER Ship To]))) Then ![AR SALE Ship To] = CStr(adoPrimaryRS![AR ORDER Ship To]) End If If Not (IsNull(Trim(adoPrimaryRS![AR ORDER Shipping Customer]))) Then ![AR SALE Shipping Customer] = CStr(adoPrimaryRS![AR ORDER Shipping Customer]) End If ![AR SALE Shipping Address 1] = CStr(adoPrimaryRS![AR ORDER Shipping Address 1]) If Not (IsNull(Trim(adoPrimaryRS![AR ORDER Shipping Address 2]))) Then ![AR SALE Shipping Address 2] = CStr(adoPrimaryRS![AR ORDER Shipping Address 2]) End If ![AR SALE Shipping City] = CStr(adoPrimaryRS![AR ORDER Shipping City]) ![AR SALE Shipping State] = CStr(adoPrimaryRS![AR ORDER Shipping State]) ![AR SALE Shipping Postal] = CStr(adoPrimaryRS![AR ORDER Shipping Postal]) ![AR SALE Shipping Country] = CStr(adoPrimaryRS![AR ORDER Shipping Country]) ![AR SALE Salesperson] = CStr(adoPrimaryRS![AR ORDER Salesperson]) ![AR SALE Payment Terms] = CStr(adoPrimaryRS![AR ORDER Payment Terms]) ![AR SALE Payment Method] = CStr(adoPrimaryRS![AR ORDER Payment Method]) ![AR SALE Subtotal] = Me.txtFields(24).Text ![AR SALE Discount Percent] = adoPrimaryRS![AR ORDER Discount Percent] ![AR SALE Discount Amount] = Me.txtFields(25).Text ![AR SALE Tax Percent] = adoPrimaryRS![AR ORDER Tax Percent] ![AR SALE Sales Tax] = Me.txtFields(26).Text ![AR SALE Freight] = adoPrimaryRS![AR ORDER Freight] ![AR SALE Total] = Me.txtFields(30).Text ![AR SALE Amount Paid] = adoPrimaryRS![AR ORDER Amount Paid] ![AR SALE Balance Due] = adoPrimaryRS![AR ORDER Balance Due] ![AR SALE Undistributed Amt] = adoPrimaryRS![AR ORDER Undistributed Amt] ![AR SALE Commission] = adoPrimaryRS![AR ORDER Commission] ![AR SALE Commissionable Sales] = adoPrimaryRS![AR ORDER Commissionable Sales] If Not (IsNull(Trim(adoPrimaryRS![AR ORDER Description]))) Then ![AR SALE Description] = CStr(adoPrimaryRS![AR ORDER Description]) End If If Not (IsNull(Trim(adoPrimaryRS![AR ORDER Message]))) Then ![AR SALE Message] = CStr(adoPrimaryRS![AR ORDER Message]) End If If Not (IsNull(Trim(adoPrimaryRS![AR ORDER Apply To Number]))) Then ![AR SALE Apply To Number] = CStr(adoPrimaryRS![AR ORDER Apply To Number]) End If If Not (IsNull(Trim(adoPrimaryRS![AR ORDER Check Number]))) Then ![AR SALE Check Number] = CStr(adoPrimaryRS![AR ORDER Check Number]) End If If Not (IsNull(Trim(adoPrimaryRS![AR ORDER Check Acct ID]))) Then ![AR SALE Check Acct ID] = CStr(adoPrimaryRS![AR ORDER Check Acct ID]) End If ![AR SALE Check Date] = adoPrimaryRS![AR ORDER Check Date] ![AR SALE Quote Document #] = adoPrimaryRS![AR ORDER Quote Document #] If Not (IsNull(Trim(adoPrimaryRS![AR ORDER Notes]))) Then ![AR SALE Notes] = CStr(adoPrimaryRS![AR ORDER Notes]) End If If Not (IsNull(Trim(adoPrimaryRS![AR ORDER Department]))) Then ![AR SALE Department] = CStr(adoPrimaryRS![AR ORDER Department]) End If ![AR SALE Taxable Subtotal] = adoPrimaryRS![AR ORDER Taxable Subtotal] ![AR SALE Tax Freight] = adoPrimaryRS![AR ORDER Tax Freight] ![AR SALE Recurring YN] = False ![AR SALE Cleared] = False ![AR SALE Recur Type] = "Never" .Update lSalesID = ![AR SALE Document #] End With ' ---------------- ' Dim GetCost As Recordset Set GetCost = New Recordset GetCost.Open "Select * from [INV ITEMS]", db, adOpenStatic, adLockReadOnly With rsSalesDetail Do While Not rsOrderDetail.EOF rsSalesDetail.AddNew ![AR SALED Document #] = lSalesID ![AR SALED Qty] = rsOrderDetail![AR ORDERD Qty To Invoice] ![AR SALED Date] = rsOrderDetail![AR ORDERD Date] ![AR SALED Item ID] = CStr(rsOrderDetail![AR ORDERD Item ID]) ![AR SALED Units] = CStr(rsOrderDetail![AR ORDERD Units]) ![AR SALED Discount %] = rsOrderDetail![AR ORDERD Discount %] ![AR SALED Tax] = rsOrderDetail![AR ORDERD Tax] ![AR SALED Tax Rate] = rsOrderDetail![AR ORDERD Tax Rate] ![AR SALED Description] = CStr(rsOrderDetail![AR ORDERD Description]) If Not (IsNull(Trim(rsOrderDetail![AR ORDERD Row Type]))) Then ![AR SALED Row Type] = CStr(rsOrderDetail![AR ORDERD Row Type]) End If GetCost.MoveFirst GetCost.Find "[INV ITEM Id]='" & rsOrderDetail![AR ORDERD Item ID] & "'" ![AR SALED Item Cost] = GetCost![INV ITEM New Price] ![AR SALED Unit Price] = rsOrderDetail![AR ORDERD Unit Price] ![AR SALED Item Total] = rsOrderDetail![AR ORDERD Item Total] ![AR SALED Posting Account] = CStr(rsOrderDetail![AR ORDERD Posting Account]) If Not (IsNull(Trim(rsOrderDetail![AR ORDERD Department]))) Then ![AR SALED Department] = CStr(rsOrderDetail![AR ORDERD Department]) End If If Not (IsNull(Trim(rsOrderDetail![AR ORDERD Project]))) Then ![AR SALED Project] = CStr(rsOrderDetail![AR ORDERD Project]) End If If Not (IsNull(Trim(rsOrderDetail![AR ORDERD Account Type]))) Then ![AR SALED Account Type] = CStr(rsOrderDetail![AR ORDERD Account Type]) End If .Update rsOrderDetail.MoveNext Loop '}-> Do While Not rsOrderDetail.EOF End With ' -------------- ' rsOrderTracking.AddNew Dim AddInteger2 As Integer AddInteger2 = txtFields(2) ' they need string to update --- need to find other way ' rsOrderTracking![Order ID] = AddInteger2 rsOrderTracking![Invoice ID] = lSalesID rsOrderTracking.Update Dim SProc As String SProc = "DELETE FROM [AR Sales] WHERE ((([AR Sales].[AR SALE Ext Document #]) Is Null Or ([AR Sales].[AR SALE Ext Document #])='')) OR ((([AR Sales].[AR SALE Customer ID]) Is Null Or ([AR Sales].[AR SALE Customer ID])=''))" db.Execute SProc Call RedoNumbers Screen.MousePointer = vbNormal iSuccess = False db.BeginTrans iResponse = MsgBox("Invoice created, do you want to post it now?" & vbCr & "Posting the Invoice will take a few seconds", vbYesNo, "Posting") If iResponse = vbNo Then GoTo byPassInvoiceCreation End If If Datavalidate = False Then GoTo byPassInvoiceCreation End If Screen.MousePointer = vbHourglass iSuccess = PostInvoice(lSalesID, True) byPassInvoiceCreation: If iSuccess = True Then db.CommitTrans MsgBox "Invoice created and posted successfully." rsSales.MoveFirst rsSales.Find "[AR SALE Ext Document #]=" & sExtDocument If rsSales.EOF Then Else rsSales("AR SALE Posted YN") = True rsSales.Update End If Else db.RollbackTrans MsgBox "Invoice created but not posted." Screen.MousePointer = vbNormal End If chkInvoiced.Value = 1 adoPrimaryRS![AR ORDER Invoiced] = True cmdUpdate_Click Dim iBackOrdered As Integer iBackOrdered = False Screen.MousePointer = vbHourglass rsOrderDetail.MoveFirst Do While Not rsOrderDetail.EOF If rsOrderDetail("AR ORDERD Qty") > rsOrderDetail("AR ORDERD Qty To Invoice") Then iBackOrdered = True Exit Do End If rsOrderDetail.MoveNext Loop If iBackOrdered = True Then iResponse = MsgBox("Would you like to create a backorder for quantities not invoiced?", vbYesNo, "Integral Accounting") If iResponse = vbYes Then iSuccess% = CreateBackOrder(![AR ORDER Document #], False) If iSuccess% = True Then MsgBox "Backorder created successfully.", , "Integral Accounting" Else MsgBox "An error occurred creating the backorder.", , "Integral Accounting" End If Else End If ButtEnabled False Screen.MousePointer = vbNormal End If End With '}-> With ADOprimaryrs Out_Of_Here: rsSales.Close rsSalesDetail.Close rsOrderTracking.Close rsOrderDetail.Close Set rsSales = Nothing Set rsSalesDetail = Nothing Set rsOrderTracking = Nothing Set rsOrderDetail = Nothing Screen.MousePointer = vbNormal Exit Sub cmdCreateInvoice_Error: Call LogError("Order Transactions", "cmdCreateInvoice_Click", Now, Err, Error, True) Resume Next End Sub ''{*********************************************************** ''-TITLE: RedoNumbers() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays RedoNumbers() ''-USAGE: RedoNumbers() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: LogError ''-CALLED BY: RedoNumbers; frm_AR_Order_Entry.cmdCreateInvoice_Click; frm_INV_Production.Form_Unload; frm_INV_Production.Form_Unload; frm_INV_Adjust.Form_Unload; frm_INV_Adjust.Form_Unload; frm_AR_Order_Entry.cmdCreateInvoice_Click ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: [Order Numbers] /All or Any of the Fields ''-VARIABLES: SProc ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub RedoNumbers() Table of Contents Dim SProc As String SProc = "DELETE FROM [Order Numbers]" db.Execute SProc SProc = "INSERT INTO [Order Numbers] ( [Document ID] ) SELECT DISTINCT [AR Order].[AR ORDER Ext Document #] FROM [AR Order]" Exit Sub RedoOrderNumbers_Error: Call LogError("Order Transactions", "RedoSalesNumbers", Now, Err, Error, True) Resume Next End Sub ''{*********************************************************** ''-TITLE: cmdDate_Click ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays cmdDate_Click ''-USAGE: cmdDate_Click(Index As Integer) ''-INPUT ASSERTION: Index As Integer ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: cmdDate_Click; frm_Bank_Reconciliation.LoadnCalculate ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: iResponse ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub cmdDate_Click(Index As Integer) Table of Contents Select Case Index Case 0 '--->>>date Menu_Calendar.WhoCallMe True, 1621 SetDueDate Case 1 '--->>>due date Dim iResponse As Integer iResponse = MsgBox("Due Date were set automaticly... Are sure you want to change it?", vbYesNo, "Due Date") If iResponse = vbNo Then Exit Sub End If Menu_Calendar.WhoCallMe True, 1622 Case 4 Menu_Calendar.WhoCallMe True, 1623 Case 20 '---->>> ship date Menu_Calendar.WhoCallMe True, 1624 End Select Menu_Calendar.Show vbModal End Sub ''{*********************************************************** ''-TITLE: cmdInvoiceBackOrder_Click() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays cmdInvoiceBackOrder_Click() ''-USAGE: cmdInvoiceBackOrder_Click() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: cmdInvoiceBackOrder_Click ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub cmdInvoiceBackOrder_Click() Table of Contents cmdCreateInvoice_Click End Sub ''{*********************************************************** ''-TITLE: cmdLookupAdd_Click() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays cmdLookupAdd_Click() ''-USAGE: cmdLookupAdd_Click() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: cmdLookupAdd_Click ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub cmdLookupAdd_Click() Table of Contents frm_LookupCustomer.OpenLookupCustomer "frm_AR_Order_Entry" frm_LookupCustomer.Show vbModal If IsNull(txtFieldsCust(0)) Then Exit Sub If txtFieldsCust(0) = "" Then Exit Sub AR_ORDER_Customer_ID_AfterUpdate End Sub ''{*********************************************************** ''-TITLE: cmdLookupShip_Click() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays cmdLookupShip_Click() ''-USAGE: cmdLookupShip_Click() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: cmdLookupShip_Click ''-TABLES/FIELDS USED: [AR SHIP to] /All or Any of the Fields ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub cmdLookupShip_Click() Table of Contents If AllLookup.GetWhichTable(1001, "Select [AR SHIP ID],[AR SHIP Name],[AR SHIP Address 1],[AR SHIP Address 2],[AR SHIP City],[AR SHIP State],[AR SHIP Postal],[AR SHIP Country] From [AR SHIP to] WHERE [AR SHIP Customer ID]='" & txtFieldsCust(0) & "' ORDER BY [AR SHIP ID] ", "Shipping Address", "Shipping ID//Place Name//Address 1//Address 2//City//State//Postal//Country") = True Then AllLookup.Show vbModal End If End Sub ''{*********************************************************** ''-TITLE: cmdSmallBig_Click() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays cmdSmallBig_Click() ''-USAGE: cmdSmallBig_Click() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: cmdSmallBig_Click; frm_AP_Receiving_Entry.Form_Load; frm_AP_RMA_Entry.Form_Load; frm_AP_Voucher_Entry.Form_Load; frm_AR_Order_Entry.Form_Load; frm_AR_Return_Entry.Form_Load; frm_AR_Sales_Memo_Entry.Form_Load; frm_AP_Purchase_Entry.Form_Load; frm_AR_Sales_Entry.Form_Load; frm_AP_Credit_Entry.Form_Load; frm_AR_Credit_Entry.Form_Load; frm_AR_Quote_Entry.Form_Load ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub cmdSmallBig_Click() Table of Contents CommonSmallBig Me End Sub ''{*********************************************************** ''-TITLE: GetNumberDoc ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays GetNumberDoc ''-USAGE: GetNumberDoc(NDoc As String) ''-INPUT ASSERTION: NDoc As String ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: GetNumberDoc; frm_AR_Batch_Posting.grdDataGrid_ButtonClick; frm_AR_Batch_Posting.grdDataGrid_ButtonClick; frm_AR_Batch_Posting.grdDataGrid_ButtonClick; frm_AR_Batch_Posting.grdDataGrid_ButtonClick; frm_AP_Batch_Posting.grdDataGrid_ButtonClick; frm_AP_Batch_Posting.grdDataGrid_ButtonClick; frm_AP_Batch_Posting.grdDataGrid_ButtonClick; frm_AP_Batch_Posting.grdDataGrid_ButtonClick ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Public Sub GetNumberDoc(NDoc As String) Table of Contents NumberDoc = NDoc End Sub ''{*********************************************************** ''-TITLE: Form_Load() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure loads Form ''-USAGE: Form_Load() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: Form_Load; Main_Calculator.Cancel_Click ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub Form_Load() Table of Contents On Error GoTo FormErr Set db = New Connection strNo = "TempNoOE" & Int((727 * Rnd) + 1) db.CursorLocation = adUseClient db.Provider = "MSDataShape" db.Open "Data " & gblADOProvider OpenDB "SHAPE {select * from [AR Order] WHERE [AR ORDER Document Type]='Order' Order by [AR ORDER Document #]} AS ParentCMD APPEND ({select * from [AR Order Detail] } AS ChildCMD RELATE [AR ORDER Document #] TO [AR ORDERD Document #]) AS ChildCMD" LoadCombo "semua" If CheckNewDB(adoPrimaryRS, "Order Entry") = True Then cmdAdd_Click Else Set grdDataGrid.DataSource = adoPrimaryRS("ChildCMD").UnderlyingValue grdDataGrid.Columns(0).Button = True grdDataGrid.Columns(9).Button = True grdDataGrid.Columns(10).Button = True grdDataGrid.AllowAddNew = True End If grdOnAddNew = False mbDataChanged = False NewLoad = False Screen.MousePointer = vbNormal If NumberDoc <> "" Then If adoPrimaryRS.RecordCount > 0 Then adoPrimaryRS.MoveFirst Dim i As Integer For i = 0 To adoPrimaryRS.RecordCount - 1 If adoPrimaryRS![AR SALE Ext Document #] = NumberDoc Then Exit For End If adoPrimaryRS.MoveNext Next i End If End If resize Me cmdLookupCust.Enabled = True cmdSmallBig_Click Exit Sub FormErr: If Err.Number = -2147217887 Then MsgBox "In your database already exist same record or you did try before post this record!!!" Screen.MousePointer = vbNormal Exit Sub MsgBox Err.Description Screen.MousePointer = vbDefault End If End Sub ''{*********************************************************** ''-TITLE: Form_Resize() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure resizes Form ''-USAGE: Form_Resize() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: Form_Resize; Main_Browser.Form_Load ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub Form_Resize() Table of Contents CommonResize Me End Sub ''{*********************************************************** ''-TITLE: Form_KeyDown ''-MODULE ID: 1.139 ''-PURPOSE: Event KeyDown for Form ''-USAGE: Form_KeyDown(KeyCode As Integer, Shift As Integer) ''-INPUT ASSERTION: KeyCode As Integer, Shift As Integer ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: Form_KeyDown ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) Table of Contents If mbEditFlag Or mbAddNewFlag Then Exit Sub End If Select Case KeyCode Case vbKeyEscape cmdClose_Click Case vbKeyEnd cmdLast_Click Case vbKeyHome cmdFirst_Click Case vbKeyUp, vbKeyPageUp If Shift = vbCtrlMask Then cmdFirst_Click Else cmdPrevious_Click End If Case vbKeyDown, vbKeyPageDown If Shift = vbCtrlMask Then cmdLast_Click Else cmdNext_Click End If End Select End Sub ''{*********************************************************** ''-TITLE: Form_Unload ''-MODULE ID: 1.139 ''-PURPOSE: This procedure unloads Form ''-USAGE: Form_Unload(Cancel As Integer) ''-INPUT ASSERTION: Cancel As Integer ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: Form_Unload; Purchasing_Module.RedoPurchaseNumbers ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub Form_Unload(Cancel As Integer) Table of Contents On Error GoTo FormErr Screen.MousePointer = vbDefault If UnloadForm(adoPrimaryRS) = 0 Then db.Close Set db = Nothing Else Cancel = 1 End If Exit Sub FormErr: MsgBox Err.Description Screen.MousePointer = vbDefault End Sub ''{*********************************************************** ''-TITLE: adoPrimaryRS_MoveComplete ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays adoPrimaryRS_MoveComplete ''-USAGE: adoPrimaryRS_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset) ''-INPUT ASSERTION: ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: adoPrimaryRS_MoveComplete ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub adoPrimaryRS_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset) Table of Contents If adoPrimaryRS.BOF Or adoPrimaryRS.EOF Then GoTo JumpIf End If If adoPrimaryRS![AR ORDER Invoiced] = True Then ButtEnabled False Else ButtEnabled True End If JumpIf: lblStatus.caption = "Record: " & CStr(adoPrimaryRS.AbsolutePosition) & " of " & CStr(adoPrimaryRS.RecordCount) End Sub ''{*********************************************************** ''-TITLE: ButtEnabled(SetEnabled ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays ButtEnabled(SetEnabled ''-USAGE: ButtEnabled(SetEnabled As Boolean) ''-INPUT ASSERTION: ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: ButtEnabled; frm_AP_Receiving_Entry.cmdPost_Click; frm_AP_Receiving_Entry.cmdPost_Click; frm_AP_Receiving_Entry.adoPrimaryRS_MoveComplete; frm_AP_Receiving_Entry.adoPrimaryRS_MoveComplete; frm_AP_RMA_Entry.cmdPost_Click; frm_AP_RMA_Entry.cmdPost_Click; frm_AP_RMA_Entry.adoPrimaryRS_MoveComplete; frm_AP_RMA_Entry.adoPrimaryRS_MoveComplete; frm_AP_Voucher_Entry.cmdPost_Click; frm_AP_Voucher_Entry.cmdPost_Click; frm_AP_Voucher_Entry.adoPrimaryRS_MoveComplete; frm_AP_Voucher_Entry.adoPrimaryRS_MoveComplete; frm_AR_Order_Entry.cmdCreateInvoice_Click; frm_AR_Order_Entry.adoPrimaryRS_MoveComplete; frm_AR_Order_Entry.adoPrimaryRS_MoveComplete; frm_AR_Return_Entry.cmdPostInvoice_Click; frm_AR_Return_Entry.adoPrimaryRS_MoveComplete; frm_AR_Return_Entry.adoPrimaryRS_MoveComplete; frm_AR_Sales_Memo_Entry.adoPrimaryRS_MoveComplete; frm_AR_Sales_Memo_Entry.adoPrimaryRS_MoveComplete; frm_AR_Sales_Entry.adoPrimaryRS_MoveComplete; frm_AR_Sales_Entry.adoPrimaryRS_MoveComplete; frm_AP_Cre ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub ButtEnabled(SetEnabled As Boolean) Table of Contents frTotal.Enabled = SetEnabled cmdUpdate.Enabled = SetEnabled cmdDelete.Enabled = SetEnabled cmdRefresh.Enabled = SetEnabled If mbAddNewFlag = False Then cmdCreateInvoice.Enabled = SetEnabled End If End Sub ''{*********************************************************** ''-TITLE: adoPrimaryRS_WillChangeRecord ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays adoPrimaryRS_WillChangeRecord ''-USAGE: adoPrimaryRS_WillChangeRecord(ByVal adReason As ADODB.EventReasonEnum, ByVal cRecords As Long, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset) ''-INPUT ASSERTION: ByVal adReason As ADODB.EventReasonEnum, ByVal cRecords As Long, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: adoPrimaryRS_WillChangeRecord ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: bCancel ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub adoPrimaryRS_WillChangeRecord(ByVal adReason As ADODB.EventReasonEnum, ByVal cRecords As Long, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset) Table of Contents Dim bCancel As Boolean Select Case adReason Case adRsnAddNew Case adRsnClose Case adRsnDelete Case adRsnFirstChange Case adRsnMove Case adRsnRequery Case adRsnResynch Case adRsnUndoAddNew Case adRsnUndoDelete Case adRsnUndoUpdate Case adRsnUpdate End Select If bCancel Then adStatus = adStatusCancel End If End Sub ''{*********************************************************** ''-TITLE: RefreshDB() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays RefreshDB() ''-USAGE: RefreshDB() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: RefreshDB; frm_AP_Receiving_Entry.cmdAdd_Click; frm_AP_RMA_Entry.cmdAdd_Click; frm_AP_Voucher_Entry.cmdAdd_Click; frm_AR_Order_Entry.cmdAdd_Click; frm_AR_Return_Entry.cmdAdd_Click; frm_AR_Sales_Memo_Entry.cmdAdd_Click; frm_AP_Purchase_Entry.cmdAdd_Click; frm_AR_Sales_Entry.cmdAdd_Click; frm_AP_Credit_Entry.cmdAdd_Click; frm_AR_Credit_Entry.cmdAdd_Click; frm_AR_Quote_Entry.cmdAdd_Click ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub RefreshDB() Table of Contents Screen.MousePointer = vbHourglass db.Close Set db = Nothing NewLoad = True Set db = New Connection db.CursorLocation = adUseClient db.Provider = "MSDataShape" db.Open "Data " & gblADOProvider OpenDB "SHAPE {select * from [AR Order] WHERE [AR ORDER Document Type]='Order' Order by [AR ORDER Document #]} AS ParentCMD APPEND ({select * from [AR Order Detail] } AS ChildCMD RELATE [AR ORDER Document #] TO [AR ORDERD Document #]) AS ChildCMD" LoadCombo "semua" If CheckNewDB(adoPrimaryRS, "Purchase Entry") = True Then cmdAdd_Click Else Set grdDataGrid.DataSource = adoPrimaryRS("ChildCMD").UnderlyingValue grdDataGrid.Columns(0).Button = True grdDataGrid.Columns(9).Button = True grdDataGrid.Columns(10).Button = True grdDataGrid.AllowAddNew = True End If adoPrimaryRS.MoveLast grdOnAddNew = False mbDataChanged = False NewLoad = False Screen.MousePointer = vbNormal End Sub ''{*********************************************************** ''-TITLE: cmdAdd_Click() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays cmdAdd_Click() ''-USAGE: cmdAdd_Click() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: cmdAdd_Click; frm_AP_Receiving_Entry.Form_Load; frm_AP_Receiving_Entry.RefreshDB; frm_AP_Receiving_Entry.cmdDelete_Click; frm_AP_Receiving_Entry.grdDataGrid_GotFocus; frm_AP_RMA_Entry.Form_Load; frm_AP_RMA_Entry.RefreshDB; frm_AP_RMA_Entry.cmdDelete_Click; frm_AP_RMA_Entry.grdDataGrid_GotFocus; frm_AP_Voucher_Entry.Form_Load; frm_AP_Voucher_Entry.RefreshDB; frm_AP_Voucher_Entry.cmdDelete_Click; frm_AP_Voucher_Entry.grdDataGrid_GotFocus; frm_AR_Order_Entry.Form_Load; frm_AR_Order_Entry.RefreshDB; frm_AR_Order_Entry.cmdDelete_Click; frm_AR_Order_Entry.grdDataGrid_GotFocus; frm_AR_Return_Entry.Form_Load; frm_AR_Return_Entry.RefreshDB; frm_AR_Return_Entry.cmdDelete_Click; frm_AR_Return_Entry.grdDataGrid_GotFocus; frm_AR_Sales_Memo_Entry.RefreshDB; frm_AR_Sales_Memo_Entry.Form_Load; frm_AR_Sales_Memo_Entry.cmdDelete_Click; frm_AR_Sales_Memo_Entry.grdDataGrid_GotFocus; frm_AP_Purchase_Entry.Form_Load; frm_AP_Purchase_Entry.RefreshDB; frm_AP_Purchase_Entry.cmdDelete_Click; frm ''-TABLES/FIELDS USED: "projARSales7" /All or Any of the Fields ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: rm, m, rr, n ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub cmdAdd_Click() Table of Contents On Error GoTo AddErr Screen.MousePointer = vbHourglass If cmdAdd.caption = "&Save" Then If Not CheckEmpty Then Screen.MousePointer = vbNormal Exit Sub End If With adoPrimaryRS On Error Resume Next .UpdateBatch adAffectCurrent If .ActiveConnection.Errors.Count <> 0 Then .Filter = adFilterConflictingRecords .Resync adAffectGroup, adResyncUnderlyingValues If .RecordCount > 0 Then .MoveFirst While Not .EOF Dim rm As Recordset Set rm = New Recordset rm.Open "projARSales7", db, , , adCmdTable Dim m As Variant m = rm.RecordCount If IsEmpty(m) Then strNo = 0 Else If IsNull(rm!max_ID) Then strNo = 0 Else strNo = rm!max_ID + 1 End If rm.Close End If adoPrimaryRS("AR ORDER Ext Document #") = strNo & format(Now, "MMddyy") .MoveNext Wend .UpdateBatch adAffectGroup Else MsgBox "Errors occurred during the update. " & _ .ActiveConnection.Errors(0).Number & " " & _ .ActiveConnection.Errors(0).Description, _ vbOKOnly End If On Error GoTo AddErr .Filter = adFilterNone End If .MoveLast grdDataGrid.HoldFields grdDataGrid.ReBind grdDataGrid.Refresh NewLoad = False cmdRefresh_Click .MoveLast End With cmdAdd.caption = "&Add" cmdLookupShip.Visible = False mbAddNewFlag = False SetButtons True cmdLookupCust.Visible = True cmdLookupAdd.Visible = False cmdCreateInvoice.Enabled = True If adoPrimaryRS.RecordCount = 1 Then RefreshDB End If Else mbAddNewFlag = True Dim rr As Recordset Set rr = New Recordset rr.Open "projARSales7", db, , , adCmdTable Dim n As Variant n = rr.RecordCount If IsEmpty(n) Then strNo = 0 Else If IsNull(rr!max_ID) Then strNo = 0 Else strNo = rr!max_ID + 1 End If rr.Close End If cmdLookupCust.Visible = False cmdLookupAdd.Visible = True With adoPrimaryRS If Not (.BOF Or .EOF) Then mvBookMark = .Bookmark End If NewLoad = True cmdLookupShip.Visible = True .AddNew txtFields(12) = strNo & format(Now, "MMddyy") txtFields(14) = txtFields(12) txtFields(3) = "Order" txtFields(59) = "$0.00" txtFields(4) = format(Now, "MM/dd/yyyy") txtFields(7) = format(Now, "MM/dd/yyyy") txtFields(6) = format(Now + 30, "MM/dd/yyyy") cbPurchase(244).Text = "" cbPurchase(3).Text = "" cbPurchase(15).Text = "Never" lblStatus.caption = "Add record" cmdCreateInvoice.Enabled = False SetButtons False End With End If '}-> If cmdAdd.Caption = "&Save" Then Screen.MousePointer = vbNormal Exit Sub AddErr: MsgBox Err.Description End Sub ''{*********************************************************** ''-TITLE: SetDueDate() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays SetDueDate() ''-USAGE: SetDueDate() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: SetDueDate; frm_AP_Receiving_Entry.cbPurchase_Click; frm_AP_Receiving_Entry.cmdDate_Click; frm_AP_RMA_Entry.cbPurchase_Click; frm_AP_RMA_Entry.cmdDate_Click; frm_AP_Voucher_Entry.cbPurchase_Click; frm_AP_Voucher_Entry.cmdDate_Click; frm_AR_Order_Entry.cbPurchase_Click; frm_AR_Order_Entry.cmdDate_Click; frm_AR_Return_Entry.cmdDate_Click; frm_AR_Return_Entry.cbPurchase_Click; frm_AR_Sales_Memo_Entry.cbPurchase_Click; frm_AR_Sales_Memo_Entry.cmdDate_Click; frm_AP_Purchase_Entry.cbPurchase_Click; frm_AP_Purchase_Entry.cmdDate_Click; frm_AR_Sales_Entry.cmdDate_Click; frm_AR_Sales_Entry.cbPurchase_Click; frm_AR_Credit_Entry.cmdDate_Click; frm_AR_Credit_Entry.cbPurchase_Click; frm_AR_Quote_Entry.cmdDate_Click; frm_AR_Quote_Entry.cbPurchase_Click; Menu_Calendar.Calendar1_dblClick; frm_AR_Order_Entry.cbPurchase_Click; frm_AR_Order_Entry.cmdDate_Click ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Public Sub SetDueDate() Table of Contents DueDateDay db, cbPurchase(5), txtFields(7), txtFields(6) End Sub ''{*********************************************************** ''-TITLE: cmdDelete_Click() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays cmdDelete_Click() ''-USAGE: cmdDelete_Click() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: cmdDelete_Click; frm_AP_Purchase_Entry.cmdConvert_Click ''-TABLES/FIELDS USED: [AR Order Detail] /All or Any of the Fields ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: fl_RecordGrid, RsGrid ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub cmdDelete_Click() Table of Contents Dim fl_RecordGrid As Boolean Screen.MousePointer = vbHourglass If adoPrimaryRS.RecordCount = 1 Then Dim RsGrid As Recordset Set RsGrid = New Recordset RsGrid.Open "select * from [AR Order Detail] where [AR ORDERD Document #]=" & txtFields(2), db, adOpenStatic, adLockOptimistic If RsGrid.RecordCount > 0 Then fl_RecordGrid = True End If End If If adoPrimaryRS.RecordCount > 0 Then With adoPrimaryRS .UpdateBatch adAffectCurrent If MsgBox("Are you sure that you want delete current ?", vbYesNo) = vbYes Then .Delete .UpdateBatch Else Screen.MousePointer = vbNormal Exit Sub End If OpenDB "SHAPE {select * from [AR Order] WHERE [AR ORDER Document Type]='Order' Order by [AR ORDER Document #]} AS ParentCMD APPEND ({select * from [AR Order Detail] } AS ChildCMD RELATE [AR ORDER Document #] TO [AR ORDERD Document #]) AS ChildCMD" If adoPrimaryRS.RecordCount > 0 Then Set grdDataGrid.DataSource = adoPrimaryRS("ChildCMD").UnderlyingValue Else If fl_RecordGrid = True Then grdDataGrid.Columns(0).Button = False grdDataGrid.Columns.Item(0) = "" Set grdDataGrid.DataSource = Nothing End If cmdAdd_Click End If End With End If Screen.MousePointer = vbNormal Exit Sub DeleteErr: MsgBox Err.Description Screen.MousePointer = vbNormal End Sub ''{*********************************************************** ''-TITLE: cmdRefresh_Click() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays cmdRefresh_Click() ''-USAGE: cmdRefresh_Click() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: cmdRefresh_Click; frm_AP_Receiving_Entry.cmdAdd_Click; frm_AP_RMA_Entry.cmdAdd_Click; frm_AP_Voucher_Entry.cmdAdd_Click; frm_AR_Order_Entry.cmdAdd_Click; frm_AR_Return_Entry.cmdAdd_Click; frm_AR_Sales_Memo_Entry.cmdAdd_Click; frm_AP_Purchase_Entry.cmdAdd_Click; frm_AR_Sales_Entry.cmdAdd_Click; frm_AP_Credit_Entry.cmdAdd_Click; frm_AR_Credit_Entry.cmdAdd_Click; frm_INV_Production.cmdAdd_Click; frm_AR_Quote_Entry.cmdAdd_Click; frm_INV_Adjust.cmdAdd_Click; frm_GL_Entry.cmdReverse_Click; frm_GL_Entry.cmdAdd_Click; frm_AR_Order_Entry.cmdAdd_Click ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub cmdRefresh_Click() Table of Contents RefreshButton adoPrimaryRS, grdDataGrid Change_ComboBox 3 Change_ComboBox 244 End Sub ''{*********************************************************** ''-TITLE: cmdEdit_Click() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays cmdEdit_Click() ''-USAGE: cmdEdit_Click() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: cmdEdit_Click ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub cmdEdit_Click() Table of Contents lblStatus.caption = "Edit record" mbEditFlag = True SetButtons False Exit Sub EditErr: MsgBox Err.Description End Sub ''{*********************************************************** ''-TITLE: cmdCancel_Click() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays cmdCancel_Click() ''-USAGE: cmdCancel_Click() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: cmdCancel_Click; frm_AR_Customer.cmdAdd_Click ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub cmdCancel_Click() Table of Contents Screen.MousePointer = vbHourglass SetButtons True cmdLookupCust.Visible = True cmdLookupAdd.Visible = False cmdAdd.caption = "&Add" cmdCreateInvoice.Visible = True cmdCancel.Visible = False cmdLookupShip.Visible = False mbEditFlag = False mbAddNewFlag = False If adoPrimaryRS.RecordCount > 0 Then If adoPrimaryRS.EditMode <> 0 Then adoPrimaryRS.CancelUpdate End If End If NewLoad = False If adoPrimaryRS.RecordCount > 0 Then adoPrimaryRS.MoveLast Else MsgBox "No data to publish. Exiting " & Me.caption Unload Me Exit Sub End If adoPrimaryRS.Resync adAffectCurrent If mvBookMark > 0 Then adoPrimaryRS.Bookmark = mvBookMark Else adoPrimaryRS.MoveFirst End If mbDataChanged = False Screen.MousePointer = vbNormal Change_ComboBox 3 Change_ComboBox 244 End Sub ''{*********************************************************** ''-TITLE: cmdUpdate_Click() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays cmdUpdate_Click() ''-USAGE: cmdUpdate_Click() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: UpdateButton ''-CALLED BY: cmdUpdate_Click; frm_AP_Receiving_Entry.cmdPost_Click; frm_AP_Receiving_Entry.cmdPost_Click; frm_AP_Receiving_Entry.AddNewROW_to_grd; frm_AP_Receiving_Entry.AddNewROW_to_grd; frm_AP_RMA_Entry.cmdPost_Click; frm_AP_RMA_Entry.cmdPost_Click; frm_AP_RMA_Entry.AddNewROW_to_grd; frm_AP_RMA_Entry.AddNewROW_to_grd; frm_AP_Voucher_Entry.cmdPost_Click; frm_AP_Voucher_Entry.cmdPost_Click; frm_AP_Voucher_Entry.AddNewROW_to_grd; frm_AP_Voucher_Entry.AddNewROW_to_grd; frm_AR_Order_Entry.cmdCreateInvoice_Click; frm_AR_Order_Entry.cmdCreateInvoice_Click; frm_AR_Order_Entry.AddNewROW_to_grd; frm_AR_Return_Entry.cmdPostInvoice_Click; frm_AR_Return_Entry.cmdPostInvoice_Click; frm_AR_Return_Entry.AddNewROW_to_grd; frm_AR_Sales_Memo_Entry.cmdPostInvoice_Click; frm_AR_Sales_Memo_Entry.cmdPostInvoice_Click; frm_AR_Sales_Memo_Entry.AddNewROW_to_grd; frm_AP_Purchase_Entry.AddNewROW_to_grd; frm_AP_Purchase_Entry.AddNewROW_to_grd; frm_AR_Sales_Entry.cmdPostInvoice_Click; frm_AR_Sales_Entry.cmdPos ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: FlagStatus ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub cmdUpdate_Click() Table of Contents Dim FlagStatus As Boolean FlagStatus = False Call UpdateButton(adoPrimaryRS, FlagStatus, mbAddNewFlag) mbEditFlag = Not FlagStatus mbAddNewFlag = Not FlagStatus SetButtons FlagStatus mbDataChanged = Not FlagStatus End Sub ''{*********************************************************** ''-TITLE: cmdClose_Click() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays cmdClose_Click() ''-USAGE: cmdClose_Click() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: cmdClose_Click; frm_AP_Pay_Many_Vendors.Form_KeyDown; frm_AP_Receiving_Entry.Form_KeyDown; frm_AP_RMA_Entry.Form_KeyDown; frm_AP_Voucher_Entry.Form_KeyDown; frm_AR_Order_Entry.Form_KeyDown; frm_AR_Return_Entry.Form_KeyDown; frm_AR_Sales_Memo_Entry.Form_KeyDown; frm_AR_CustomerID.grdDataGrid_DblClick; frm_LookupBankAccount.grdDataGrid_DblClick; frm_LookupCOA.grdDataGrid_DblClick; frm_LookupFind.grdDataGrid_DblClick; frm_ProperInvoiceNumber.UpdateOrderDocument; frm_AP_Purchase_Entry.Form_KeyDown; frm_AR_Sales_Entry.Form_KeyDown; frm_AP_Credit_Entry.Form_KeyDown; frm_AR_Credit_Entry.Form_KeyDown; frm_LIST_Payment_Terms.Form_KeyDown; frm_Menu_Inventory.Form_KeyDown; frm_AR_Customer.Form_KeyDown; frm_Bank_Reconciliation.Form_KeyDown; frm_LookupProduct.CmdSelect_Click; frm_LookupProduct.CmdSelect_Click; frm_LookupProduct.grdDataGrid_DblClick; frm_SYS_Setup_Items.Form_KeyDown; frm_AP_Cash_Payments.Form_KeyDown; frm_AR_Cash_Receipts.Form_KeyDown; frm_INV_Production.Form_KeyDown ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub cmdClose_Click() Table of Contents Unload Me End Sub ''{*********************************************************** ''-TITLE: cmdFirst_Click() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays cmdFirst_Click() ''-USAGE: cmdFirst_Click() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: cmdFirst_Click; frm_AP_Pay_Many_Vendors.Form_KeyDown; frm_AP_Pay_Many_Vendors.Form_KeyDown; frm_AP_Receiving_Entry.Form_KeyDown; frm_AP_Receiving_Entry.Form_KeyDown; frm_AP_RMA_Entry.Form_KeyDown; frm_AP_RMA_Entry.Form_KeyDown; frm_AP_Voucher_Entry.Form_KeyDown; frm_AP_Voucher_Entry.Form_KeyDown; frm_AR_Order_Entry.Form_KeyDown; frm_AR_Order_Entry.Form_KeyDown; frm_AR_Return_Entry.Form_KeyDown; frm_AR_Return_Entry.Form_KeyDown; frm_AR_Sales_Memo_Entry.Form_KeyDown; frm_AR_Sales_Memo_Entry.Form_KeyDown; frm_AP_Purchase_Entry.Form_KeyDown; frm_AP_Purchase_Entry.Form_KeyDown; frm_AR_Sales_Entry.Form_KeyDown; frm_AR_Sales_Entry.Form_KeyDown; frm_AP_Credit_Entry.Form_KeyDown; frm_AP_Credit_Entry.Form_KeyDown; frm_AR_Credit_Entry.Form_KeyDown; frm_AR_Credit_Entry.Form_KeyDown; frm_LIST_Payment_Terms.Form_KeyDown; frm_LIST_Payment_Terms.Form_KeyDown; frm_Menu_Inventory.Form_KeyDown; frm_Menu_Inventory.Form_KeyDown; frm_AR_Customer.Form_KeyDown; frm_AR_Customer.Form_KeyDown; fr ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub cmdFirst_Click() Table of Contents adoPrimaryRS.MoveFirst mbDataChanged = False Change_ComboBox 3 Change_ComboBox 244 Exit Sub GoFirstError: MsgBox Err.Description End Sub ''{*********************************************************** ''-TITLE: cmdLast_Click() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays cmdLast_Click() ''-USAGE: cmdLast_Click() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: cmdLast_Click; frm_AP_Pay_Many_Vendors.Form_KeyDown; frm_AP_Pay_Many_Vendors.Form_KeyDown; frm_AP_Receiving_Entry.Form_KeyDown; frm_AP_Receiving_Entry.Form_KeyDown; frm_AP_RMA_Entry.Form_KeyDown; frm_AP_RMA_Entry.Form_KeyDown; frm_AP_Voucher_Entry.Form_KeyDown; frm_AP_Voucher_Entry.Form_KeyDown; frm_AR_Order_Entry.Form_KeyDown; frm_AR_Order_Entry.Form_KeyDown; frm_AR_Return_Entry.Form_KeyDown; frm_AR_Return_Entry.Form_KeyDown; frm_AR_Sales_Memo_Entry.Form_KeyDown; frm_AR_Sales_Memo_Entry.Form_KeyDown; frm_AP_Purchase_Entry.Form_KeyDown; frm_AP_Purchase_Entry.Form_KeyDown; frm_AR_Sales_Entry.Form_KeyDown; frm_AR_Sales_Entry.Form_KeyDown; frm_AP_Credit_Entry.Form_KeyDown; frm_AP_Credit_Entry.Form_KeyDown; frm_AR_Credit_Entry.Form_KeyDown; frm_AR_Credit_Entry.Form_KeyDown; frm_LIST_Payment_Terms.Form_KeyDown; frm_LIST_Payment_Terms.Form_KeyDown; frm_Menu_Inventory.Form_KeyDown; frm_Menu_Inventory.Form_KeyDown; frm_AR_Customer.Form_KeyDown; frm_AR_Customer.Form_KeyDown; frm ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub cmdLast_Click() Table of Contents adoPrimaryRS.MoveLast mbDataChanged = False Change_ComboBox 3 Change_ComboBox 244 Exit Sub GoLastError: MsgBox Err.Description End Sub ''{*********************************************************** ''-TITLE: cmdNext_Click() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays cmdNext_Click() ''-USAGE: cmdNext_Click() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: cmdNext_Click; frm_AP_Pay_Many_Vendors.Form_KeyDown; frm_AP_Receiving_Entry.Form_KeyDown; frm_AP_RMA_Entry.Form_KeyDown; frm_AP_Voucher_Entry.Form_KeyDown; frm_AR_Order_Entry.Form_KeyDown; frm_AR_Return_Entry.Form_KeyDown; frm_AR_Sales_Memo_Entry.Form_KeyDown; frm_AP_Purchase_Entry.Form_KeyDown; frm_AR_Sales_Entry.Form_KeyDown; frm_AP_Credit_Entry.Form_KeyDown; frm_AR_Credit_Entry.Form_KeyDown; frm_LIST_Payment_Terms.Form_KeyDown; frm_Menu_Inventory.Form_KeyDown; frm_AR_Customer.Form_KeyDown; frm_Bank_Reconciliation.Form_KeyDown; frm_SYS_Setup_Items.Form_KeyDown; frm_AP_Cash_Payments.Form_KeyDown; frm_INV_Production.Form_KeyDown; frm_SYS_Setup_Tax_Authorities.Form_KeyDown; frm_AR_Quote_Entry.Form_KeyDown; frm_SYS_Setup_Tax_Group.Form_KeyDown; frm_SYS_Setup_Periods.Form_KeyDown; frm_SYS_Setup_Chart_Of_Accounts.Form_KeyDown; frm_Menu_Contacts.Form_KeyDown; frm_LIST_Shipping_Methods.Form_KeyDown; frm_LIST_Vendor_Types.Form_KeyDown; frm_LIST_Payment_Methods.Form_KeyDown; fr ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub cmdNext_Click() Table of Contents If Not adoPrimaryRS.EOF Then adoPrimaryRS.MoveNext End If If adoPrimaryRS.EOF And adoPrimaryRS.RecordCount > 0 Then Beep adoPrimaryRS.MoveLast End If mbDataChanged = False Change_ComboBox 3 Change_ComboBox 244 Exit Sub GoNextError: MsgBox Err.Description End Sub ''{*********************************************************** ''-TITLE: cmdPrevious_Click() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays cmdPrevious_Click() ''-USAGE: cmdPrevious_Click() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: cmdPrevious_Click; frm_AP_Pay_Many_Vendors.Form_KeyDown; frm_AP_Receiving_Entry.Form_KeyDown; frm_AP_RMA_Entry.Form_KeyDown; frm_AP_Voucher_Entry.Form_KeyDown; frm_AR_Order_Entry.Form_KeyDown; frm_AR_Return_Entry.Form_KeyDown; frm_AR_Sales_Memo_Entry.Form_KeyDown; frm_AP_Purchase_Entry.Form_KeyDown; frm_AR_Sales_Entry.Form_KeyDown; frm_AP_Credit_Entry.Form_KeyDown; frm_AR_Credit_Entry.Form_KeyDown; frm_LIST_Payment_Terms.Form_KeyDown; frm_Menu_Inventory.Form_KeyDown; frm_AR_Customer.Form_KeyDown; frm_Bank_Reconciliation.Form_KeyDown; frm_SYS_Setup_Items.Form_KeyDown; frm_AP_Cash_Payments.Form_KeyDown; frm_INV_Production.Form_KeyDown; frm_SYS_Setup_Tax_Authorities.Form_KeyDown; frm_AR_Quote_Entry.Form_KeyDown; frm_SYS_Setup_Tax_Group.Form_KeyDown; frm_SYS_Setup_Periods.Form_KeyDown; frm_SYS_Setup_Chart_Of_Accounts.Form_KeyDown; frm_Menu_Contacts.Form_KeyDown; frm_LIST_Shipping_Methods.Form_KeyDown; frm_LIST_Vendor_Types.Form_KeyDown; frm_LIST_Payment_Methods.Form_KeyDown ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub cmdPrevious_Click() Table of Contents If Not adoPrimaryRS.BOF Then adoPrimaryRS.MovePrevious End If If adoPrimaryRS.BOF And adoPrimaryRS.RecordCount > 0 Then Beep adoPrimaryRS.MoveFirst End If mbDataChanged = False Change_ComboBox 3 Change_ComboBox 244 Exit Sub GoPrevError: MsgBox Err.Description End Sub ''{*********************************************************** ''-TITLE: SetButtons ''-MODULE ID: 1.139 ''-PURPOSE: This procedure manages Visible/inVisible of Buttons ''-USAGE: SetButtons(bVal As Boolean) ''-INPUT ASSERTION: bVal As Boolean ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: SetButtons; frm_AP_Pay_Many_Vendors.cmdAdd_Click; frm_AP_Pay_Many_Vendors.cmdEdit_Click; frm_AP_Pay_Many_Vendors.cmdCancel_Click; frm_AP_Pay_Many_Vendors.cmdUpdate_Click; frm_AP_Receiving_Entry.cmdAdd_Click; frm_AP_Receiving_Entry.cmdAdd_Click; frm_AP_Receiving_Entry.cmdEdit_Click; frm_AP_Receiving_Entry.cmdCancel_Click; frm_AP_Receiving_Entry.cmdUpdate_Click; frm_AP_RMA_Entry.cmdAdd_Click; frm_AP_RMA_Entry.cmdAdd_Click; frm_AP_RMA_Entry.cmdEdit_Click; frm_AP_RMA_Entry.cmdCancel_Click; frm_AP_RMA_Entry.cmdUpdate_Click; frm_AP_Voucher_Entry.cmdAdd_Click; frm_AP_Voucher_Entry.cmdAdd_Click; frm_AP_Voucher_Entry.cmdEdit_Click; frm_AP_Voucher_Entry.cmdCancel_Click; frm_AP_Voucher_Entry.cmdUpdate_Click; frm_AR_Order_Entry.cmdAdd_Click; frm_AR_Order_Entry.cmdAdd_Click; frm_AR_Order_Entry.cmdEdit_Click; frm_AR_Order_Entry.cmdCancel_Click; frm_AR_Order_Entry.cmdUpdate_Click; frm_AR_Return_Entry.cmdAdd_Click; frm_AR_Return_Entry.cmdAdd_Click; frm_AR_Return_Entry.cmdEdit_Click; fr ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub SetButtons(bVal As Boolean) Table of Contents If mbAddNewFlag = True Then cmdAdd.caption = "&Save" cmdCancel.Visible = True cmdCancel.Left = cmdUpdate.Left cmdCancel.Top = cmdUpdate.Top Else cmdAdd.Visible = bVal cmdCancel.Visible = False End If cmdUpdate.Visible = bVal cmdDelete.Visible = bVal cmdClose.Visible = bVal cmdRefresh.Visible = bVal cmdNext.Enabled = bVal cmdFirst.Enabled = bVal cmdLast.Enabled = bVal cmdCalculation.Enabled = bVal cmdLookupOrderDoc.Visible = bVal cmdLookupPurchaseOrder.Visible = bVal cmdPrevious.Enabled = bVal End Sub ''{*********************************************************** ''-TITLE: grdDataGrid_AfterDelete() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays grdDataGrid_AfterDelete() ''-USAGE: grdDataGrid_AfterDelete() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: grdDataGrid_AfterDelete ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub grdDataGrid_AfterDelete() Table of Contents If grdDataGrid.Row = 0 Then txtFields(24) = 0 txtFields(25) = "$0.00" txtFields(26) = "$0.00" txtFields(30) = "$0.00" End If End Sub ''{*********************************************************** ''-TITLE: grdDataGrid_Error ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays grdDataGrid_Error ''-USAGE: grdDataGrid_Error(ByVal DataError As Integer, Response As Integer) ''-INPUT ASSERTION: ByVal DataError As Integer, Response As Integer ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: grdDataGrid_Error ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub grdDataGrid_Error(ByVal DataError As Integer, Response As Integer) Table of Contents If DataGridKnownError(DataError) Then Response = 0 End If End Sub ''{*********************************************************** ''-TITLE: grdDataGrid_GotFocus() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays grdDataGrid_GotFocus() ''-USAGE: grdDataGrid_GotFocus() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: grdDataGrid_GotFocus ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub grdDataGrid_GotFocus() Table of Contents If mbAddNewFlag = True Then If cmdAdd.Enabled Then cmdAdd.SetFocus End If cmdAdd_Click End If End Sub ''{*********************************************************** ''-TITLE: grdDataGrid_OnAddNew() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays grdDataGrid_OnAddNew() ''-USAGE: grdDataGrid_OnAddNew() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: grdDataGrid_OnAddNew ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub grdDataGrid_OnAddNew() Table of Contents grdOnAddNew = True End Sub ''{*********************************************************** ''-TITLE: grdDataGrid_RowColChange ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays grdDataGrid_RowColChange ''-USAGE: grdDataGrid_RowColChange(LastRow As Variant, ByVal LastCol As Integer) ''-INPUT ASSERTION: LastRow As Variant, ByVal LastCol As Integer ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: grdDataGrid_RowColChange ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub grdDataGrid_RowColChange(LastRow As Variant, ByVal LastCol As Integer) Table of Contents If NewLoad = True Then Exit Sub End If If adoPrimaryRS.BOF And adoPrimaryRS.EOF Then Exit Sub End If If grdDataGrid.col > 0 And grdDataGrid.Row > -1 Then If grdDataGrid.Columns(0) = "" Then GoTo Bad_Attempt End If End If CalcTotals Select Case grdDataGrid.col Case 2, 3, 5, 6, 9, 10 grdDataGrid.AllowUpdate = True Case Else grdDataGrid.AllowUpdate = False End Select Exit Sub Bad_Attempt: grdDataGrid.AllowUpdate = False grdDataGrid.col = 0 Exit_Sub: End Sub ''{*********************************************************** ''-TITLE: grdDataGrid_AfterColEdit ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays grdDataGrid_AfterColEdit ''-USAGE: grdDataGrid_AfterColEdit(ByVal ColIndex As Integer) ''-INPUT ASSERTION: ByVal ColIndex As Integer ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: grdDataGrid_AfterColEdit; frm_AP_Receiving_Entry.grdDataGrid_ButtonClick; frm_AP_RMA_Entry.grdDataGrid_ButtonClick; frm_AP_Voucher_Entry.grdDataGrid_ButtonClick; frm_AR_Order_Entry.grdDataGrid_ButtonClick; frm_AR_Return_Entry.grdDataGrid_ButtonClick; frm_AR_Sales_Memo_Entry.grdDataGrid_ButtonClick; frm_AP_Purchase_Entry.grdDataGrid_ButtonClick; frm_AR_Sales_Entry.grdDataGrid_ButtonClick; frm_AP_Credit_Entry.grdDataGrid_ButtonClick; frm_AR_Credit_Entry.grdDataGrid_ButtonClick; frm_INV_Production.grdDataGrid_ButtonClick; frm_SYS_Setup_Employee.grdDataGrid_ButtonClick; frm_AR_Quote_Entry.grdDataGrid_ButtonClick; frm_SYS_Setup_Tax_Group.grdDataGrid_ButtonClick; frm_INV_Adjust.grdDataGrid_ButtonClick; frm_GL_Entry.grdDataGrid_ButtonClick ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub grdDataGrid_AfterColEdit(ByVal ColIndex As Integer) Table of Contents If grdDataGrid.Row = -1 Then Exit Sub End If Select Case grdDataGrid.col Case 2, 3, 5, 6, 9, 10 If grdDataGrid.Columns(ColIndex) > "999999999999999" Then grdDataGrid.Columns(ColIndex) = 0 End If If grdDataGrid.Columns(ColIndex) = "" Then grdDataGrid.Columns(ColIndex) = 0 End If End Select If grdDataGrid.Columns(3) = "0" And ColIndex = 2 Then grdDataGrid.Columns(3) = grdDataGrid.Columns(2) End If CalculateTable Dim r As Recordset Set r = grdDataGrid.DataSource If r.EditMode <> adEditNone Then r.Update End If adoPrimaryRS.Update End Sub ''{*********************************************************** ''-TITLE: grdDataGrid_BeforeDelete ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays grdDataGrid_BeforeDelete ''-USAGE: grdDataGrid_BeforeDelete(Cancel As Integer) ''-INPUT ASSERTION: Cancel As Integer ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: grdDataGrid_BeforeDelete ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: DeleteCration ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub grdDataGrid_BeforeDelete(Cancel As Integer) Table of Contents Dim DeleteCration As Integer DeleteCration = MsgBox("Attempting to delete the data. " & vbCr & "Are you sure?", vbYesNo, "Deleting Confirmation") If DeleteCration = vbNo Then Cancel = 1 End If End Sub ''{*********************************************************** ''-TITLE: NewgrdDatagrid() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays NewgrdDatagrid() ''-USAGE: NewgrdDatagrid() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: NewgrdDatagrid; frm_AP_Receiving_Entry.grdDataGrid_ButtonClick; frm_AP_RMA_Entry.grdDataGrid_ButtonClick; frm_AP_Voucher_Entry.grdDataGrid_ButtonClick; frm_AR_Order_Entry.grdDataGrid_ButtonClick; frm_AR_Return_Entry.grdDataGrid_ButtonClick; frm_AR_Sales_Memo_Entry.grdDataGrid_ButtonClick; frm_AP_Purchase_Entry.grdDataGrid_ButtonClick; frm_AR_Sales_Entry.grdDataGrid_ButtonClick; frm_AP_Credit_Entry.grdDataGrid_ButtonClick; frm_AR_Credit_Entry.grdDataGrid_ButtonClick; frm_Pyrl_Withholding.grdDataGrid_ButtonClick; frm_INV_Production.grdDataGrid_ButtonClick; frm_AR_Quote_Entry.grdDataGrid_ButtonClick; frm_SYS_Setup_Tax_Group.grdDataGrid_ButtonClick; frm_INV_Adjust.grdDataGrid_ButtonClick; frm_GL_Entry.grdDataGrid_ButtonClick ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub NewgrdDatagrid() Table of Contents NewLoad = True NewRowForDataGrid adoPrimaryRS, grdDataGrid, "AR ORDER Date", txtFields(4).Text grdOnAddNew = False NewLoad = False End Sub ''{*********************************************************** ''-TITLE: grdDataGrid_ButtonClick ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays grdDataGrid_ButtonClick ''-USAGE: grdDataGrid_ButtonClick(ByVal ColIndex As Integer) ''-INPUT ASSERTION: ByVal ColIndex As Integer ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: grdDataGrid_ButtonClick; frm_Vendor_Beginning_Balances.cmdClose_Click; frm_Vendor_Beginning_Balances_Payment.cmdClose_Click; frm_Vendor_Beginning_Balances_Payment.cmdClose_Click; frm_SYS_Setup_Tax_Group.TAX_ITEM; frm_Customer_Beginning_Balances.cmdClose_Click; frm_Customer_Beginning_Balances_Payment.cmdClose_Click; frm_Customer_Beginning_Balances_Payment.cmdClose_Click ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub grdDataGrid_ButtonClick(ByVal ColIndex As Integer) Table of Contents Select Case ColIndex Case 7 SendKeys ("{ENTER}") If grdDataGrid.Columns(7).Text = "No" Then grdDataGrid.Columns(7).Text = "Yes" Else grdDataGrid.Columns(7).Text = "No" End If SendKeys ("{ENTER}") SendKeys ("{down}") SendKeys ("{up}") End Select Select Case ColIndex Case 0 ' select the item from the ITEM_ID ' INV_ITEM Case 9 ' Get the type of account for the selected row ' COA_grdDataGrid_Butt Case 10 ' Select the project that have been working on ' Proj_Projects Case Else End Select If grdOnAddNew = True Then NewgrdDatagrid End If grdDataGrid_AfterColEdit 0 Exit Sub GoPrevError: MsgBox Err.Description End Sub ''{*********************************************************** ''-TITLE: INV_ITEM() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays INV_ITEM() ''-USAGE: INV_ITEM() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: INV_ITEM; frm_AP_Receiving_Entry.grdDataGrid_ButtonClick; frm_AP_RMA_Entry.grdDataGrid_ButtonClick; frm_AR_Order_Entry.grdDataGrid_ButtonClick; frm_AR_Return_Entry.grdDataGrid_ButtonClick; frm_AP_Purchase_Entry.grdDataGrid_ButtonClick; frm_AR_Sales_Entry.grdDataGrid_ButtonClick; frm_INV_Production.grdDataGrid_ButtonClick; frm_AR_Quote_Entry.grdDataGrid_ButtonClick; frm_INV_Adjust.grdDataGrid_ButtonClick; frm_AR_Order_Entry.grdDataGrid_ButtonClick ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub INV_ITEM() Table of Contents frm_LookupProduct.OpenLookupProduct frm_AR_Order_Entry, "frm_AR_Order_Entry" frm_LookupProduct.Show vbModal End Sub ''{*********************************************************** ''-TITLE: COA_grdDataGrid_Butt() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays COA_grdDataGrid_Butt() ''-USAGE: COA_grdDataGrid_Butt() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: COA_grdDataGrid_Butt; frm_AP_Receiving_Entry.grdDataGrid_ButtonClick; frm_AP_RMA_Entry.grdDataGrid_ButtonClick; frm_AP_Voucher_Entry.grdDataGrid_ButtonClick; frm_AR_Order_Entry.grdDataGrid_ButtonClick; frm_AR_Return_Entry.grdDataGrid_ButtonClick; frm_AR_Sales_Memo_Entry.grdDataGrid_ButtonClick; frm_AP_Purchase_Entry.grdDataGrid_ButtonClick; frm_AR_Sales_Entry.grdDataGrid_ButtonClick; frm_AP_Credit_Entry.grdDataGrid_ButtonClick; frm_AR_Credit_Entry.grdDataGrid_ButtonClick; frm_AR_Quote_Entry.grdDataGrid_ButtonClick; frm_INV_Adjust.grdDataGrid_ButtonClick; frm_GL_Entry.grdDataGrid_ButtonClick; frm_AR_Order_Entry.grdDataGrid_ButtonClick ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub COA_grdDataGrid_Butt() Table of Contents frm_LookupCOA.OpenFind "GL Accounts", "Account No", "Account Name", "Account Type", 2, "GL COA Account No", "GL COA Account Name", "GL COA Asset Type", "GL Chart Of Accounts", "Select [GL COA Account No],[GL COA Account Name],[GL COA Asset Type] From [GL Chart Of Accounts] ORDER BY [GL COA Account No] " frm_LookupCOA.Show vbModal End Sub ''{*********************************************************** ''-TITLE: Proj_Projects() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays Proj_Projects() ''-USAGE: Proj_Projects() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: Proj_Projects; frm_AP_Receiving_Entry.grdDataGrid_ButtonClick; frm_AP_RMA_Entry.grdDataGrid_ButtonClick; frm_AP_Voucher_Entry.grdDataGrid_ButtonClick; frm_AR_Order_Entry.grdDataGrid_ButtonClick; frm_AR_Return_Entry.grdDataGrid_ButtonClick; frm_AR_Sales_Memo_Entry.grdDataGrid_ButtonClick; frm_AP_Purchase_Entry.grdDataGrid_ButtonClick; frm_AR_Sales_Entry.grdDataGrid_ButtonClick; frm_AP_Credit_Entry.grdDataGrid_ButtonClick; frm_AR_Credit_Entry.grdDataGrid_ButtonClick; frm_INV_Production.grdDataGrid_ButtonClick; frm_AR_Quote_Entry.grdDataGrid_ButtonClick; frm_INV_Adjust.grdDataGrid_ButtonClick; frm_GL_Entry.grdDataGrid_ButtonClick; frm_AR_Order_Entry.grdDataGrid_ButtonClick ''-TABLES/FIELDS USED: [PROJ Projects] /All or Any of the Fields ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub Proj_Projects() Table of Contents If AllLookup.GetWhichTable(1003, "Select [PROJ ID],[PROJ Name],[PROJ Description] From [PROJ Projects] Where [PROJ Projects].[PROJ Customer ID]='" & txtFieldsCust(0) & "' ORDER BY [PROJ ID] ", "Project", "Project ID//Project Name//Description") = True Then AllLookup.Show vbModal End If End Sub ''{*********************************************************** ''-TITLE: CalculateTable() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays CalculateTable() ''-USAGE: CalculateTable() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: CalculateTable; frm_AP_Receiving_Entry.grdDataGrid_AfterColEdit; frm_AP_RMA_Entry.grdDataGrid_AfterColEdit; frm_AR_Order_Entry.grdDataGrid_AfterColEdit; frm_AR_Return_Entry.grdDataGrid_AfterColEdit; frm_AP_Purchase_Entry.grdDataGrid_AfterColEdit; frm_AR_Sales_Entry.cmdPricing_Click; frm_AR_Sales_Entry.grdDataGrid_AfterColEdit; frm_AR_Quote_Entry.grdDataGrid_AfterColEdit; frm_AR_Order_Entry.grdDataGrid_AfterColEdit ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub CalculateTable() Table of Contents Dim i As Integer grdDataGrid.Columns(8).Text = grdDataGrid.Columns(3).Value * grdDataGrid.Columns(5).Text grdDataGrid.Columns(8).Text = grdDataGrid.Columns(8).Value - (grdDataGrid.Columns(8).Value * (grdDataGrid.Columns(6).Value / 100)) Exit Sub CalculateTable_ERR: End Sub ''{*********************************************************** ''-TITLE: AddNewROW_to_grd() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays AddNewROW_to_grd() ''-USAGE: AddNewROW_to_grd() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: AddNewROW_to_grd ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Public Sub AddNewROW_to_grd() Table of Contents On Error Resume Next grdDataGrid.AllowUpdate = True With adoPrimaryRS If Not (.BOF And .EOF) Then mvBookMark = .Bookmark End If End With Set grdDataGrid.DataSource = Nothing adoPrimaryRS.Requery cmdUpdate_Click adoPrimaryRS.Requery Set grdDataGrid.DataSource = adoPrimaryRS("ChildCMD").UnderlyingValue grdOnAddNew = False If mvBookMark > 0 Then adoPrimaryRS.Bookmark = mvBookMark Else adoPrimaryRS.MoveFirst End If End Sub ''{*********************************************************** ''-TITLE: CalcSalesTaxPercent() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays CalcSalesTaxPercent() ''-USAGE: CalcSalesTaxPercent() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: LogError ''-CALLED BY: CalcSalesTaxPercent; frm_AR_Order_Entry.AR_ORDER_Customer_ID_AfterUpdate; frm_AR_Order_Entry.cbPurchase_Click; frm_AR_Order_Entry.cmdUpdatedua_Click; frm_AR_Return_Entry.AR_SALE_Customer_ID_AfterUpdate; frm_AR_Return_Entry.cmdUpdatedua_Click; frm_AR_Return_Entry.cbPurchase_Click; frm_AR_Sales_Memo_Entry.AR_SALE_Customer_ID_AfterUpdate; frm_AR_Sales_Memo_Entry.cbPurchase_Change; frm_AP_Purchase_Entry.cbPurchase_Change; frm_AR_Sales_Entry.AR_SALE_Customer_ID_AfterUpdate; frm_AR_Sales_Entry.cbPurchase_Click; frm_AR_Sales_Entry.cmdUpdatedua_Click; frm_AR_Sales_Entry.cmdUpdate_Click; frm_AR_Credit_Entry.AR_SALE_Customer_ID_AfterUpdate; frm_AR_Credit_Entry.cbPurchase_Click; frm_AR_Credit_Entry.cmdUpdatedua_Click; frm_AR_Quote_Entry.AR_ORDER_Customer_ID_AfterUpdate; frm_AR_Quote_Entry.cmdUpdatedua_Click; frm_AR_Quote_Entry.cbPurchase_Click; frm_AR_Quote_Entry.cmdUpdate_Click; frm_AR_Order_Entry.AR_ORDER_Customer_ID_AfterUpdate; frm_AR_Order_Entry.cbPurchase_Click; frm_AR_Order ''-TABLES/FIELDS USED: [SYS Tax Group Detail] /All or Any of the Fields ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: rs1, TaxPercent# ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub CalcSalesTaxPercent() Table of Contents Dim rs1 As Recordset Dim TaxPercent# 'cbPurchase(3) Set rs1 = New Recordset rs1.Open ("SELECT * FROM [SYS Tax Group Detail] WHERE [SYS TAXGRPD Group ID] = '" & txtFieldsCust(9) & "'"), db, adOpenStatic, adLockOptimistic On Error Resume Next ' rs1.MoveFirst Do While Not rs1.EOF TaxPercent# = TaxPercent# + DLookup("[SYS Tax Percent]", "[SYS Tax]", "[SYS Tax ID] = '" & rs1("SYS TAXGRPD Tax ID") & "'") rs1.MoveNext Loop txtFields(29) = TaxPercent# Exit Sub CalcSalesTaxPercent_Error: Call LogError("Order Transactions", "CalcSalesTaxPercent", Now, Err, Error, True) Resume Next End Sub ''{*********************************************************** ''-TITLE: CalcTotals() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays CalcTotals() ''-USAGE: CalcTotals() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: CalcTotals; frm_AP_Receiving_Entry.cmdCalculation_Click; frm_AP_Receiving_Entry.cmdPost_Click; frm_AP_Receiving_Entry.grdDataGrid_RowColChange; frm_AP_Receiving_Entry.txtFields_LostFocus; frm_AP_Receiving_Entry.txtFields_LostFocus; frm_AP_RMA_Entry.grdDataGrid_RowColChange; frm_AP_RMA_Entry.txtFields_LostFocus; frm_AP_RMA_Entry.txtFields_LostFocus; frm_AP_Voucher_Entry.cmdCalculation_Click; frm_AP_Voucher_Entry.cmdPost_Click; frm_AP_Voucher_Entry.grdDataGrid_RowColChange; frm_AP_Voucher_Entry.txtFields_LostFocus; frm_AP_Voucher_Entry.txtFields_LostFocus; frm_AR_Order_Entry.cmdCalculation_Click; frm_AR_Order_Entry.grdDataGrid_RowColChange; frm_AR_Order_Entry.txtFields_LostFocus; frm_AR_Order_Entry.txtFields_LostFocus; frm_AR_Return_Entry.cmdCalculation_Click; frm_AR_Return_Entry.cmdPostInvoice_Click; frm_AR_Return_Entry.grdDataGrid_RowColChange; frm_AR_Return_Entry.txtFields_LostFocus; frm_AR_Return_Entry.txtFields_LostFocus; frm_AR_Sales_Memo_Entry.cmdCalculation_Click; ''-TABLES/FIELDS USED: [AR Order Detail] /All or Any of the Fields ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: Calcrs, ItemTotal ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub CalcTotals() Table of Contents If NewLoad = True Then Exit Sub End If If Not frTotal.Enabled Then Exit Sub End If If adoPrimaryRS.EOF = True Or adoPrimaryRS.BOF = True Then Exit Sub End If If mbAddNewFlag = True Then Exit Sub End If grdDataGrid.Row = grdDataGrid.Row Dim Calcrs As New Recordset Calcrs.Open "SELECT [AR ORDERD Item Total] FROM [AR Order Detail] WHERE [AR ORDERD Document #]=" & txtFields(2), db, adOpenStatic, adLockOptimistic Dim ItemTotal As Double With Calcrs If .BOF Then Exit Sub End If .MoveFirst While Not .EOF ItemTotal = ItemTotal + Calcrs![AR ORDERD Item Total] .MoveNext Wend End With txtFields(24) = format(CCur(ItemTotal), "$###,###,###,###.00") calculateALL End Sub ''{*********************************************************** ''-TITLE: calculateALL() ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays calculateALL() ''-USAGE: calculateALL() ''-INPUT ASSERTION: Expects as input : nothing ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: calculateALL; frm_AP_Receiving_Entry.CalcTotals; frm_AP_RMA_Entry.CalcTotals; frm_AP_Voucher_Entry.CalcTotals; frm_AR_Order_Entry.CalcTotals; frm_AR_Return_Entry.CalcTotals; frm_AR_Sales_Memo_Entry.CalcTotals; frm_AP_Purchase_Entry.CalcTotals; frm_AR_Sales_Entry.CalcTotals; frm_AP_Credit_Entry.CalcTotals; frm_AR_Credit_Entry.CalcTotals; frm_AR_Quote_Entry.CalcTotals; frm_AR_Order_Entry.CalcTotals ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub calculateALL() Table of Contents If txtFields(24) = 0 Then txtFields(25) = "$0.00" txtFields(26) = "$0.00" txtFields(30) = "$0.00" txtFields(33) = "$0.00" Exit Sub End If txtFields(24) = format(txtFields(24), "###,###,###.00") txtFields(25) = format(txtFields(25), "###,###,###.00") txtFields(26) = format(txtFields(26), "###,###,###.00") txtFields(27) = format(txtFields(27), "###,###,###.00") txtFields(30) = format(txtFields(30), "###,###,###.00") txtFields(33) = format(txtFields(33), "###,###,###.00") txtFields(36) = format(txtFields(36), "###,###,###.00") txtFields(59) = format(txtFields(59), "###,###,###.00") If Val(txtFields(28)) <> 0 Then txtFields(25) = txtFields(24) * (txtFields(28) / 100) Else txtFields(25) = "$0.00" End If txtFields(59) = DSum("[AR Orderd Item Total]", "[AR Order Detail]", "[AR Orderd Document #] = " & txtFields(2) & " AND [AR Orderd Tax] = 1") If adoPrimaryRS![AR ORDER Tax Freight] = True Then txtFields(59) = txtFields(59) + adoPrimaryRS![AR ORDER Freight] End If txtFields(59) = txtFields(59) - txtFields(25) If Val(txtFields(29)) <> 0 Then txtFields(26) = CCur(txtFields(59) * (txtFields(29) / 100)) Else txtFields(26) = "$0.00" End If If txtFields(26) = "" Then txtFields(26) = 0 End If txtFields(30) = txtFields(24) - txtFields(25) + txtFields(26) + txtFields(27) txtFields(33) = txtFields(30) - txtFields(36) txtFields(24) = format(txtFields(24), "$###,###,###.00") txtFields(25) = format(txtFields(25), "$###,###,###.00") txtFields(26) = format(txtFields(26), "$###,###,###.00") txtFields(27) = format(txtFields(27), "$###,###,###.00") txtFields(30) = format(txtFields(30), "$###,###,###.00") txtFields(33) = format(txtFields(33), "$###,###,###.00") txtFields(36) = format(txtFields(36), "$###,###,###.00") txtFields(59) = format(txtFields(59), "$###,###,###.00") adoPrimaryRS![AR ORDER Balance Due] = txtFields(33) adoPrimaryRS![AR ORDER Amount Paid] = txtFields(36) adoPrimaryRS![AR ORDER Total] = txtFields(30) adoPrimaryRS![AR ORDER Subtotal] = txtFields(24) adoPrimaryRS![AR ORDER Discount Amount] = txtFields(25) adoPrimaryRS![AR ORDER Sales Tax] = txtFields(26) adoPrimaryRS![AR ORDER Freight] = txtFields(27) adoPrimaryRS![AR ORDER Taxable Subtotal] = txtFields(59) Exit Sub CalcTotals_Error: End Sub ''{*********************************************************** ''-TITLE: CheckEmpty() ''-MODULE ID: 1.139 ''-PURPOSE: This function checks if empty. ''-USAGE: CheckEmpty() ''-INPUT ASSERTION: ''-OUTPUT ASSERTION: Boolean ''-CALLS: This procedure calls no other functions ''-CALLED BY: CheckEmpty; frm_AP_Receiving_Entry.cmdAdd_Click; frm_AP_RMA_Entry.cmdAdd_Click; frm_AP_Voucher_Entry.cmdAdd_Click; frm_AR_Order_Entry.cmdCreateInvoice_Click; frm_AR_Order_Entry.cmdAdd_Click; frm_AR_Return_Entry.cmdPostInvoice_Click; frm_AR_Return_Entry.cmdAdd_Click; frm_AR_Sales_Memo_Entry.cmdAdd_Click; frm_AR_Sales_Memo_Entry.cmdPostInvoice_Click; frm_AP_Purchase_Entry.cmdAdd_Click; frm_AR_Sales_Entry.cmdPostInvoice_Click; frm_AR_Sales_Entry.cmdAdd_Click; frm_AP_Credit_Entry.cmdAdd_Click; frm_AR_Credit_Entry.cmdPostInvoice_Click; frm_AR_Credit_Entry.cmdAdd_Click; frm_INV_Production.cmdPost_Click; frm_INV_Production.cmdAdd_Click; frm_AR_Quote_Entry.cmdAdd_Click; frm_SYS_Setup_Tax_Group.cmdAdd_Click; frm_PayrollItems.cmdClosePyrlItem_Click; frm_PayrollItems.cmdPyrlUpdate_Click; frm_INV_Adjust.cmdPost_Click; frm_INV_Adjust.cmdAdd_Click; frm_GL_Entry.cmdPost_Click; frm_GL_Entry.cmdAdd_Click; frm_Bank_Transaction.cmdPost_Click; frm_Bank_Transaction.cmdAdd_Click; frm_AP_Vend ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Function CheckEmpty() As Boolean Table of Contents If txtFieldsCust(0).Text = "" Then MsgBox "There is an empty data either in Customer ID", vbInformation, "Empty Data" CheckEmpty = False Exit Function End If If txtFieldsShip(0).Text = "" Then MsgBox "There is an empty data either in Shipping ID", vbInformation, "Empty Data" CheckEmpty = False Exit Function End If If cbPurchase(244).Text = "" Then MsgBox "There is an empty data in " & lblfields(244).caption, vbInformation, "Empty Data" CheckEmpty = False Exit Function End If If cbPurchase(3).Text = "" Then MsgBox "There is an empty data in " & lblfields(3).caption, vbInformation, "Empty Data" CheckEmpty = False Exit Function End If If cbPurchase(5).Text = "" Then MsgBox "There is an empty data in " & lblfields(5).caption, vbInformation, "Empty Data" CheckEmpty = False Exit Function End If If cbPurchase(2).Text = "" Then MsgBox "There is an empty data in " & lblfields(2).caption, vbInformation, "Empty Data" CheckEmpty = False Exit Function End If If cbPurchase(15).Text = "" Then MsgBox "There is an empty data in " & lblfields(15).caption, vbInformation, "Empty Data" CheckEmpty = False Exit Function End If If cbPurchase(16).Text = "" Then MsgBox "There is an empty data in " & lblfields(16).caption, vbInformation, "Empty Data" CheckEmpty = False Exit Function End If If txtFields(7).Text = "" Then MsgBox "There is an empty data in " & lblfields(7).caption, vbInformation, "Empty Data" CheckEmpty = False Exit Function End If If txtFields(6).Text = "" Then MsgBox "There is an empty data in " & lblfields(6).caption, vbInformation, "Empty Data" CheckEmpty = False Exit Function End If If txtFields(20).Text = "" Then MsgBox "There is an empty data in " & lblfields(20).caption, vbInformation, "Empty Data" CheckEmpty = False Exit Function End If If txtFields(35).Text = "" Then MsgBox "There is an empty data in " & lblLabels(35).caption, vbInformation, "Empty Data" CheckEmpty = False Exit Function End If Dim i As Integer If mbAddNewFlag = True Then For i = 24 To 30 If i <> 29 And i <> 28 Then txtFields(i) = 0 End If Next txtFields(33) = "$0.00" txtFields(36) = "$0.00" End If CheckEmpty = True End Function ''{*********************************************************** ''-TITLE: optOrderType_Click ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays optOrderType_Click ''-USAGE: optOrderType_Click(Index As Integer) ''-INPUT ASSERTION: Index As Integer ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: optOrderType_Click ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: SetEnabled ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub optOrderType_Click(Index As Integer) Table of Contents Dim SetEnabled As Boolean Select Case Index Case 0 ' Order ' Screen.MousePointer = vbHourglass Label2.caption = "Sales Order" OpenDB "SHAPE {select * from [AR Order] WHERE [AR ORDER Document Type]='Order' Order by [AR ORDER Document #]} AS ParentCMD APPEND ({select * from [AR Order Detail] } AS ChildCMD RELATE [AR ORDER Document #] TO [AR ORDERD Document #]) AS ChildCMD" SetEnabled = True cmdInvoiceBackOrder.Visible = False Screen.MousePointer = vbNormal Case 1 ' Backorder ' Screen.MousePointer = vbHourglass Label2.caption = "Back Order" OpenDB "SHAPE {select * from [AR Order] WHERE [AR ORDER Document Type]='Backorder' Order by [AR ORDER Document #]} AS ParentCMD APPEND ({select * from [AR Order Detail] } AS ChildCMD RELATE [AR ORDER Document #] TO [AR ORDERD Document #]) AS ChildCMD" SetEnabled = False cmdInvoiceBackOrder.Visible = True Screen.MousePointer = vbNormal End Select frFirst.Enabled = SetEnabled frSecond.Enabled = SetEnabled cmdAdd.Enabled = SetEnabled cmdDelete.Enabled = SetEnabled cmdRefresh.Enabled = SetEnabled cmdCreateInvoice.Visible = SetEnabled End Sub ''{*********************************************************** ''-TITLE: txtFields_LostFocus ''-MODULE ID: 1.139 ''-PURPOSE: This procedure displays txtFields_LostFocus ''-USAGE: txtFields_LostFocus(Index As Integer) ''-INPUT ASSERTION: Index As Integer ''-OUTPUT ASSERTION: This procedure returns no values ''-CALLS: This procedure calls no other functions ''-CALLED BY: txtFields_LostFocus; frm_INV_Production.NewgrdDatagrid; frm_INV_Production.NewgrdDatagrid; frm_INV_Adjust.NewgrdDatagrid; frm_INV_Adjust.NewgrdDatagrid ''-TABLES/FIELDS USED: ''-TABLES/FIELDS AFFECTED: ''-VARIABLES: ''-METHOD: ''-REVISION HISTORY: Created before 12/01/2000, Corrected 04/07/2003 ''-REMARKS: ''***********************************************************}
Private Sub txtFields_LostFocus(Index As Integer) Table of Contents If Index > 24 And Index < 31 Then CalcTotals End If If Index = 36 Then CalcTotals End If End Sub