Breakout - CB- Check cashbook for bad BankSubTotal Values

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

Breakout - CB- Check cashbook for bad BankSubTotal Values

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

Breakout - CB- Check cashbook for bad BankSubTotal Values

This is a breakout to perform a check for CashBook Payments AND receipts - it ASSUMES that you have already TICKED the "Auto Sub Total The Bank" option for each user using these modules.
Initially it checks that the BankSubTotal is not blank - this has been an issue for us with bank recs and may not apply to others.
It also ensures for RECEIPTS ONLY that each line has the same BankSubTotal Value as the Allocated Amount - this is another double check for similar reasons to stop operators forgetting to allocate receipt amounts - just to avoid another possible human error.

If either of the above conditions are true - it simply presents a warning and DOES NOT save the record. it does not attempt to correct any values - and it places you back exactly where you were before attempting to SAVE without losing any data so that the operator can correct the condition.

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

Left-Click "CashBook Save Before" Breakout
add this one line at the top :-

Code: Select all
'
'CashBook Save Before
'--------------------------------
'
'Cancel the save if any of the lines have a blank bank subtotal.
' FormObject.Formtype - 0 = receipts, 1 = payments (int)
'
Dim MyGridManager
Set MyGridManager = CreateObject("JiwaManageGrid.clsStdFunctions")
   
For lMyLoop = 1 To FormObject.grdLines.MaxRows - 1
   If (Trim(MyGridManager.GridText(FormObject.grdLines,"BankSubTotal",lMyLoop)) = "") Then
      rtnCancel = True
      MsgBox "Error:" & vbcrlf & vbcrlf & "Transaction line " & lMyLoop & " No Sub-Total." & vbcrlf & "Save cancelled."
      Exit For
   End If
   If (FormObject.FormType = 0) And (Trim(MyGridManager.GridText(FormObject.grdLines,"HomeAmount",lMyLoop)) <> Trim(MyGridManager.GridText(FormObject.grdLines,"FXAllocatedAmount",lMyLoop))) Then
      rtnCancel = True
      MsgBox "Error:" & vbcrlf & vbcrlf & "Transaction line " & lMyLoop & " Not Allocated." & vbcrlf & "Save cancelled."
      Exit For
   End If
Next
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 3 guests

cron