Breakout - CB- Enhanced Date/RemitNo AutoFill on Tabbing

Discussions relating to 3rd party solutions (customisations, reports, modules, applications) which are a value-add to the Jiwa product.

Breakout - CB- Enhanced Date/RemitNo AutoFill on Tabbing

Postby Hyperus » Mon Oct 27, 2008 3:30 pm

Breakout - CB- Enhanced Date/RemitNo AutoFill on Tabbing

This is a breakout (set of 3) to add a little "smarts" to the existing operation of CB receipts and payments. Firstly, it enhances the way dates operate to try and "predict" the correct date that the keying operator is going to choose in the "Due Date" Field. Secondly, it trys to create a unique Remit Number on-the-fly (different from Jiwas interal auto-remit numbers that occur after saving/recording).
It is clever enough to know if an operator has already keyed over the auto-remit number with a custom-keyed remit number and should not auto-replace it if this occurs. The main idea behind this was to save the operator time and thinking when in a hurry, while still maintaining absolute accuracy for dates and uniqueness for remit numbers in different circumstances. The unique Remit number is made up by a combination of the date and the line number - to ensure no issues later on when performing Bank Recs

from Jiwa :-
JIWA - general Ledger - CashBook - Receipts
Record Menu - Manage Breakouts

Left-Click "CashBook Create New Completed" Breakout
add this one line at the top :-

Code: Select all
'CashBook Create New Completed
'------------------------------------------
' FormObject.Formtype - 0 = receipts, 1 = payments (int)
'
   Dim MyGridManager
   Set MyGridManager = CreateObject("JiwaManageGrid.clsStdFunctions")
   MyGridManager.GridText(FormObject.grdLines,"DueDate",FormObject.grdLines.MaxRows) = MyGridManager.GridText(FormObject.grdLines,"Date",FormObject.grdLines.MaxRows)
   If (FormObject.FormType = 0) Then
      MyGridManager.GridText(FormObject.grdLines,"RemitNo",FormObject.grdLines.MaxRows) = Replace(MyGridManager.GridText(FormObject.grdLines,"Date",FormObject.grdLines.MaxRows),"/","") & "-" & FormObject.grdLines.MaxRows
   Else
      MyGridManager.GridText(FormObject.grdLines,"RemitNo",FormObject.grdLines.MaxRows) = "Bank Payment Ref Here"
   End If
End Sub



Left-Click "CashBook Transaction Add Completed" Breakout
add this one line at the top :-

Code: Select all
'CashBook Transaction Add Completed
'----------------------------------------------
' FormObject.Formtype - 0 = receipts, 1 = payments (int)
'
   Dim MyGridManager
   Set MyGridManager = CreateObject("JiwaManageGrid.clsStdFunctions")
   If (FormObject.FormType = 0) Then
      CashBookObject.CashBookTransactions(Key).RemitNo = Replace(MyGridManager.GridText(FormObject.grdLines,"Date",FormObject.grdLines.MaxRows-1),"/","") & "-" & FormObject.grdLines.MaxRows-1
   Else
      CashBookObject.CashBookTransactions(Key).RemitNo = "Bank Payment Ref Here"
   End If
End Sub



Left-Click "CashBook Transaction Changed" Breakout
add this one line at the top :-

Code: Select all
'CashBook Transaction Changed
'----------------------------------------
' FormObject.Formtype - 0 = receipts, 1 = payments (int)
'
If FieldName = "TranDate" Then
   Dim PreviousRemitNo
   Dim NewRemitNo
   Dim MyGridManager
   Set MyGridManager = CreateObject("JiwaManageGrid.clsStdFunctions")
   MyGridManager.GridText(FormObject.grdLines,"DueDate",FormObject.grdLines.MaxRows) = MyGridManager.GridText(FormObject.grdLines,"Date",FormObject.grdLines.MaxRows)
   MyGridManager.GridText(FormObject.grdLines,"RemitNo",FormObject.grdLines.MaxRows) = Replace(MyGridManager.GridText(FormObject.grdLines,"Date",FormObject.grdLines.MaxRows),"/","") & "-" & FormObject.grdLines.MaxRows
   CashBookObject.CashBookTransactions(Key).DueDate = CashBookObject.CashBookTransactions(Key).TranDate
   If (FormObject.FormType = 0) Then
      PreviousRemitNo = CashBookObject.CashBookTransactions(Key).RemitNo
      NewRemitNo = Right(0 & Day(CashBookObject.CashBookTransactions(Key).TranDate),2) & Right(0 & Month(CashBookObject.CashBookTransactions(Key).TranDate),2) & Right(0 & Year(CashBookObject.CashBookTransactions(Key).TranDate),4) & "-" & Right(Key,Len(Key)-1)
      If ((Right(PreviousRemitNo,(Len(PreviousRemitNo) - 2))) = (Right(NewRemitNo,(Len(NewRemitNo) - 2)))) Then ' Check if ONLY the first 2 chars are different - in case someone has already overtyped the remit number
         CashBookObject.CashBookTransactions(Key).RemitNo = NewRemitNo
      End If
'   Else
'      CashBookObject.CashBookTransactions(Key).RemitNo = "Bank Payment Ref Here"
   End If
End If
End Sub


dont forget to leave the "End Sub" line at the end.
Click OK, Click Close, Close Receipts and ReOpen Receipts.

/Roy Adams
Hyperus
Occasional Contributor
Occasional Contributor
 
Posts: 23
Joined: Mon Feb 18, 2008 1:12 pm
Location: Shailer Park, Queensland

Return to Third Party modules and solutions

Who is online

Users browsing this forum: No registered users and 1 guest

cron