POS REPORT in Autoline KERRIDGE 8.35

Post Reply
toqeer
Posts: 6
Joined: Wed Mar 17, 2010 10:07 am
Contact:

POS REPORT in Autoline KERRIDGE 8.35

Post by toqeer » Wed Mar 17, 2010 10:54 am

I want to use library routines functions for getting full Wip details -parts and labour cost in POS module.
I used library routnies ,which i took from Autoline help .
Report detail is :
Table CONNECTION
1.S0-HEADER (HEADER RECORDS) TYPE ID PATH
2.SO-LOGLA (LABOUR LOG FILE) S 0 1
3.S0-LOGPA (PARTS LOG FILE) S 0 1

DERIVED

Name =......
LABV 0: !2_WIPNO = !1_WIPNO : !2_LINE = 0
LABC 0:GOSUB 'rg_build(RG_HANDLE(2) , 1 , SYM(RG_RECORD2$()))
PARV 0:GOSUB 'rg_start(RG_HANDLE(2),REC_KEY$,1)
PARC 0:GOSUB 'rg_read_next(RG_HANDLE(2),1,SYM(RG_RECORD2$()))
WHILE ki_status = 0 AND !2_WIPNO = !1_WIPNO DO
LABC !0_LABC + 1
LABV !0_LABV + (!2_ALLOWED * !2_RATE)
GOSUB 'rg_read_next(RG_HANDLE(2),1,SYM(RG_RECORD2$()))
WEND
!3_WIPNO = !1_WIPNO : !3_LINE = 0
GOSUB 'rg_build(RG_HANDLE(3) , 1 , SYM(RG_RECORD3$()))
GOSUB 'rg_start(RG_HANDLE(3),REC_KEY$,1)
GOSUB 'rg_read_next(RG_HANDLE(3),1,SYM(RG_RECORD3$()))
WHILE ki_status = 0 AND !3_WIPNO = !1_WIPNO DO
PARC !0_PARC + 1
PARV !0_PARV + (!3_SELLPRCE * !3_ORDERQTY)
GOSUB 'rg_read_next(RG_HANDLE(3),1,SYM(RG_RECORD3$()))
WEND
TOTV !0_LABV + !0_PARV


selection

!1_CREATED >= !0_FROM and !1_CREATED <= !0_TO

Report is executing fine , but i am not able to get results like parts sold ,labour cost & Total.

I think the problem is in connections of tables. Any body help me to sort out this report problem.

leizure
Posts: 7
Joined: Thu Jan 14, 2010 3:50 pm
Location: Cheltenham, England.
Contact:

Re: POS REPORT in Autoline KERRIDGE 8.35

Post by leizure » Wed Mar 17, 2010 11:58 am

Hi Togeer,

If I had written this I would have changed the table connections to 'Calculated'

What are you trying to acheive with !0_LABC ?
I'm gueesing this is the labour cost but all you're doing in that line is increasing the LABC (and PARC) by an increment of 1 (i.e. your just counting the lines)

Other than that it doesn't look too bad. One thing to remember though with value reports like this is taking into account Discounts applied to individual lines and Menu Pricing variances.

Your selection doesn't take into account if the WIP is closed. That is fine but don't forget that the allowed time and rate can be changed at the point of invoicing so forecasting from these figures cpould be way out!

Hope that helps.

Dave.

toqeer
Posts: 6
Joined: Wed Mar 17, 2010 10:07 am
Contact:

Re: POS REPORT in Autoline KERRIDGE 8.35

Post by toqeer » Wed Mar 17, 2010 12:48 pm

HI MR. DAVE,

I also tried the "=" calculated link connection between tables but the same result. I cant get variable values and even if i want to take any field from Labour log or parts log table its giving null in output. The problem is same even by using calculated "=" connection in tables.

Actually i want to make the report inwhich i could get parts price and labour price of costed wips . Well these routines i find out in examples ,but its giving no results. If you have any better logic for taking invoiced wips parts and labour details ,kindly give it to me .

Thanks

Toqeer

tayyab
Posts: 3
Joined: Wed Dec 23, 2009 1:11 pm

Re: POS REPORT in Autoline KERRIDGE 8.35

Post by tayyab » Thu Jun 17, 2010 3:14 pm

!id Module Company Name Description
1 SO 10 loghd Header log
2 SL 10 accts Sales ledger accounts
3 SO ** depts Department codes
4 SO ** logpa Parts log file
5 SO ** logla Labour log file
6 NL ** accts Nominal account codes
7 NL ** ccent Nominal department codes
8 NL ** expen Nominal expense codes

Type !id Column Path
S 1 SLPLAC 1
S 1 DEPT 1
S 0 3
S 0 2
S 2 NLCONTRL 1
S 6 COSTCENT 1
S 6 EXPENSE 1




PRTVAL (!1_DEPT = "P" OR !1_DEPT ="R" ?!1_GROSS:0)
LBLVAL (!1_DEPT <> "P" AND !1_DEPT <> "R"?!1_GROSS:0)
!4_RECTYPE="S":!4_WIPNO = !1_WIPNO:!4_LINE=0:!4_MAGIC=0
PSVAL 0
PCVAL 0
LSVAL 0
LCVAL 0
'rg_build(rg_handle(4),3,sym(rg_record4$())):'rg_fstart(rg_handle(4),ki_key$,3)
while true do : 'rg_read_next(rg_handle(4),3,sym(rg_Record4$()))
if ki_status <> 0 or !4_wipno <> !1_wipno then break
SIGN (!4_invstat="C"?-1:1)
SIGN !0_SIGN * !4_CONTRIB/100
ORDERQTY!4_ORDERQTY * !0_SIGN
SALEVAL !4_SELLPRCE * !0_ORDERQTY * ((100 - !4_DISCOUNT)/100)
COSTVAL !4_COSTPRCE * !0_ORDERQTY
PROFIT !0_SALEVAL - !0_COSTVAL
PSVAL !0_PSVAL + (!4_INVOICE=!1_INVOICE?!0_SALEVAL:0)
PCVAL !0_PCVAL + (!4_INVOICE=!1_INVOICE?!0_COSTVAL:0)
WEND
!5_WIPNO=!1_WIPNO:!5_LINE=0:!5_MAGIC=0
'rg_build(rg_handle(5),2,sym(rg_record5$())):'rg_fstart(rg_handle(5),ki_key$,2)
while true do : 'rg_read_next(rg_handle(5),2,sym(rg_Record5$()))
if ki_status <> 0 or !5_wipno <> !1_wipno then break
SIGN (!5_INVSTAT = "C" ? -1 : 1 )
SIGN !0_SIGN * !5_CONTRIB / 100
SALEVAL !5_ALLOWED*!5_RATE*!5_MINSUNIT/60 *!0_SIGN*((100-!5_DISCPC)/100)
COSTVAL !5_TAKEN * !5_HOURCOST * !0_SIGN
LSVAL !0_LSVAL + (!5_INVOICE=!1_INVOICE?!0_SALEVAL:0)
LCVAL !0_LCVAL + (!5_INVOICE=!1_INVOICE?!0_COSTVAL:0)
WEND
PPROFIT !0_PSVAL - !0_PCVAL
LPROFIT !0_LSVAL - !0_LCVAL
PPC (100/!0_PSVAL) * !0_PPROFIT:ERROR DO : !0_PPC =0:END DO
LPC (100/!0_LSVAL)*!0_LPROFIT:ERROR DO : !0_LPC =0:END DO
WAR ( !2_ACTYPE="W" ? !0_PSVAL+!0_LSVAL : 0 )
INT ( !2_ACTYPE="I" ? !0_PSVAL+!0_LSVAL : 0 )
RETAIL (!2_ACTYPE <> "W" and !2_ACTYPE <> "I" ? !0_PSVAL+!0_LSVAL : 0)
TOT !0_WAR+!0_INT+!0_RETAIL

tayyab
Posts: 3
Joined: Wed Dec 23, 2009 1:11 pm

Re: POS REPORT in Autoline KERRIDGE 8.35

Post by tayyab » Thu Jun 17, 2010 3:15 pm

Hi Toqeer,

Give me a call if you need to clarify anything.

Tayyab (Bahrain)

toqeer
Posts: 6
Joined: Wed Mar 17, 2010 10:07 am
Contact:

Re: POS REPORT in Autoline KERRIDGE 8.35

Post by toqeer » Sun Jun 20, 2010 11:24 am

Hi Mr.Tayyab,

Thanks alot for the report.

Howz things .Well Mr.Tayyab i will excute the report . and will let you know if will get any problem.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest