Job / Cost Code Functions

<< Click to Display Table of Contents >>

Navigation:  PaXcel  - functions >

Job / Cost Code Functions

 

JCDetail( Company, CostCode, FieldToReturn )

This will return the master information held within Pastel for the given cost code

 

GLJobCost( Company, Account, CostCode, Period )

This function will return the required balance for the transactions flagged with the required cost code and posted to the indicated accounts.

 

GLJCDC( Company, Account, CostCode, Period )

This function will return the required balance for the transactions flagged with the required cost code and posted to the indicated accounts. If a transaction is found that has been posted to either a Customer or Supplier account then the function will use the first inventory group record to compare the account(s) within the function and the inventory group Sales Account for any customer transaction and the Cost of Sales for any supplier transactions.

 

GLJCDEF( Company, Account, CostCode, Period )

This function will return the required balance for the transactions flagged with the required cost code and posted to the indicated accounts. If a transaction is found that has been posted to either a Customer or Supplier account then the function will use the first inventory group record to compare the account(s) within the function and the inventory group Sales Account for any customer transaction. If the transaction is a supplier transaction then the suppliers default contra account will be used to test against the account number within the function. NB: If you are using Pastel v5.2 then the inventory group cost of sales account will be used.

 

Important information - please read.

 

If you are attaching a cost code to a customer or supplier document, Pastel attaches the cost code to the customer/supplier entry within the ledger transaction file and not the GL transactions. This will therefore cause a problem when trying to create a P&L for a given cost code, as they will most likely do not have any GL transactions to report on.

 

For this reason we have included two additional functions (GLJCDC and GLJCDEF) which can be used to at least retrieve a balance for a GL account code.

 

Example: We have received an invoice from a supplier COM001 for R100.00 and we capture this within Pastel and attach the cost code JOB01 to the transaction. When Pastel posts the entry the supplier transaction is flagged with the cost code and not the GL contra account.

 

If we therefore use the function GLJCDC( 'c:\PastelData\_demo', '2100000', 'JOB01', 'Month 1') then the formula will most likely return a zero balance. If we change the account to 'COM001' then the formula will return a value of at least R100.

 

This is not very good when trying to create a P&L for a given job. To circum-navigate this little issue we have included the two extra functions

 

GLJCDC() function will get the cost of sales from the first inventory group and use this to check the transaction against the accounts entered within your formula.

 

GLJCDEF() function will get the default contra account from the suppliers account and use this to check the transaction against the accounts entered within your formula.

 

exceljc