#########################################################################
# Variables that can be used by the PURTRS entry point #
# #
# PACTION : Action GOBJET at the origin of the call #
# PVERSION : Numeric value of the X3 version number #
# FJL : Type of transaction in progress #
# MFROM : Code for the entry screen #
# #
#########################################################################
$ACTION
Case ACTION
When "PURTRS"
Case FJL
When "PTA" : # Request for quote transaction
When "PTD" : # Purchase request transaction
When "PTC": Gosub PURTRS_PTC : # Order transaction
When "PTT" : # Contract order transaction
When "PTF" : # Invoice transaction
Endcase
When Default:
Endcase
Return
#---------------------------------------------------------#
# Setup management of the specific fields in the orders #
# ------------------------------------------------------- #
# AAAA field not available for entry in the Management tab #
# defined in display on the POH1 base screen #
# BBBB available for entry in the Total tab #
# defined in entry mode on the POH3 base screen #
# CCCC field not available for entry in the Lines tab #
# defined in display in the base screen POH2 #
# DDDD field available for entry in the Lines tab #
# defined in entry mode on the POH2 base screen #
#---------------------------------------------------------#
$PURTRS_PTC
Case PACTION
When "RAZCRE"
[M:PTC1]AAAAFLG=1
[M:PTC2]BBBBCOD=1
[M:PTC1]CCCCFLG=1 : [M:PTC1]CCCCSCR=1 : Grizo [M:PTC1]CCCCSCR
[M:PTC3]DDDDCOD=1 : [M:PTC3]DDDDSCR=1 : Actzo [M:PTC3]DDDDDCR
When "LIENS"
If [M:PTC1]AAAAFLG=0 [M:PTC1]AAAAFLG=1 : Endif
If [M:PTC2]BBBBCOD=0 [M:PTC2]BBBBCOD=1 : Endif
If [M:PTC1]CCCCFLG=0 [M:PTC1]CCCCFLG=1 : [M:PTC1]CCCCSCR=1 : Endif
If [M:PTC3]DDDDCOD=0 [M:PTC3]DDDDCOD=1 : [M:PTC1]DDDDSCR=1 : Endif
If [M:PTC1]CCCCFLG=1 Grizo [M:PTC1]CCCCSCR Else Actzo [M:PTC1]CCCCSCR: Endif
If [M:PTC3]DDDDCOD=3 Grizo [M:PTC3]DDDDSCR Else Actzo [M:PTC3]DDDDSCR: Endif
When "INICRE"
When "INIMOD"
When "CREATION", "MODIF"
Case MFROM
When "POH1"
If [M:PTC1]AAAAFLG=1
TZONE(IZON)="AAAA" : TMOD(IZON)=3: IZON+=1
Endif
When "POH3"
If [M:PTC2]BBBBCOD>1
TZONE(IZON)="BBBB" : TMOD(IZON)=[M:PTC2]BBBBCOD: IZON+=1
Endif
When "POH2"
If [M:PTC1]CCCCFLG=1
TZONE(IZON)="CCCC" : TMOD(IZON)=3: IZON+=1
Endif
If [M:PTC1]CCCCSCR>1
TZONE(IZON)="CCCC" : TMOD(IZON)=9: TINT(IZON)=num$([M:PTC1]CCCCSCR): IZON+=1
Endif
If [M:PTC3]DDDDCOD>1
TZONE(IZON)="DDDD" : TMOD(IZON)=[M:PTC2]DDDDCOD: IZON+=1
Endif
If [M:PTC3]DDDDSCR>1
TZONE(IZON)="DDDD" : TMOD(IZON)=9: TINT(IZON)=num$([M:PTC3]DDDDSCR): IZON+=1
Endif
Endcase
When "APRES_MODIF"
If PVERSION<130
Case zoncou
When "CCCCFLG"
If val(zc)=1
[M:PTC1]CCCCSCR=1
If !GIMPORT Affzo [M:PTC1]CCCCSCR : Grizo [M:PTC1]CCCCSCR: Endif
Elsif !GIMPORT
Actzo [M:PTC1]CCCCSCR
Endif
When "DDDDCOD"
If val(zc)=3
[M:PTC3]DDDDSCR=1
If !GIMPORT Affzo [M:PTC3]DDDDSCR : Grizo [M:PTC3]DDDDSCR : Endif
Elsif !GIMPORT
Actzo [M:PTC3]DDDDSCR
Endif
Endcase
Else
Case COUZON
When "CCCCFLG"
If val(CZ)=1
[M:PTC1]CCCCSCR=1
If !GIMPORT Affzo [M:PTC1]CCCCSCR : Grizo [M:PTC1]CCCCSCR: Endif
Elsif !GIMPORT
Actzo [M:PTC1]CCCCSCR
Endif
When "DDDDCOD"
If val(CZ)=3
[M:PTC3]DDDDSCR=1
If !GIMPORT Affzo [M:PTC3]DDDDSCR : Grizo [M:PTC3]DDDDSCR : Endif
Elsif !GIMPORT
Actzo [M:PTC3]DDDDSCR
Endif
Endcase
Endif
Endcase
Return
This entry point concerns the purchase entry transaction management. It is common to the transactions for requests for quotes, purchase requests, orders, open orders, receipts, returns and invoices.
It is used to modify the window generated by the transaction, for example to delete a specific tab.
This entry point is located in the SUBPTX processing.
There is one transaction in progress. The GOK variable is used and tested. It is equal to 1. It can be set to 0 if the transaction is to be abandoned.
There is no open log file.
It is called in the CREATION, MODIF, and ANNULE actions in the processings :
- SUBPTA: Transactions for Requests for quote
- SUBPTD: Transactions for Purchase requests
- SUBPTE: Transactions for Subcontract orders
- SUBPTC: Transactions for Orders
- SUBPTT: Transactions for Open orders
- SUBPTR: Transactions Receipt
- SUBPTN: Transactions Supplier returns
- SUBPTF: Transactions Purchase invoices
Transaction | Entry screens
| Setup screens |
|
|
|
Requests for quote | PQH1: Request for quote screen | PTA0: Header screen |
|
| PTA1: Parameters 1 tab |
|
| PTA2: Parameters 2 tab |
|
|
|
Purchase requests | PSH0: Header screen | PTD0: Header screen |
| PSH1: Lines tab | PTD1: Parameters 1 tab |
|
| PTD2: Parameters 2 tab |
|
|
|
Subcontract orders | SCO0: Header screen | PTE0: Header screen |
| SCO1: Product management tab | PTE1: Tab Parameters |
| SCO2: Materials tab | PTE2: Documents tab |
| SCO3: Service tab | PTE3: Entry tab |
|
|
|
Orders | POH0: Header screen | PTC0: Header screen |
| POH1: Management tab | PTC1: Parameters tab |
| POH2: Lines tab | PTC2: Header tab |
| POH3: Total tab | PTC3: Line 1 tab |
| POI1: Buyer plan screen | PTC4: Line 2 tab |
|
| PTX4: Line 3 tab |
|
|
|
Open orders | POC0: Header screen | PTT0: Header screen |
| POC1: Management tab | PTT1: Parameters tab |
| POC2: Product tab | PTT2: Header tab |
| POC3: Total tab | PTT3: Line 1 tab |
|
| PTX4: Line 2 tab |
|
|
|
Receipts | PTH1: Receipts screen | PTR0: Header screen |
|
| PTR1: Tab Parameters |
|
| PTR2: Line 1 tab |
|
| PTR3: Line 2 tab |
|
| STOETR2: Stock tab |
|
|
|
Returns | PNH1: Returns screen | PTN0: Header screen |
|
| PTN1: Parameters tab |
|
| PTN2: Line 1 tab |
|
| PTN3: Line 2 tab |
|
| PTN4: Line 3 tab |
|
|
|
Invoices | PIH0: Header screen | PTF0: Header screen |
| PIH1: Management tab | PTF1: Tab Parameters |
| PIH3: Line tab | PTF2: Header tab |
| PIH4: Control tab | PTF3: Line tab |
The following variables are available to define the processing to carry out:
[F :AWI] The [F :AWI] class is loaded and can be modified if required to intervene on the generated window.
[F :PTR]PTRTYP Transaction type
[F :PTR]PTRNUM Transaction code
WINREF Name of the reference window
="O"+Name of the OBJect ("PQH", "PSH", "POH", "POC", "PTH", "PNH", "PIH", "SCO")
NOMWIN Name of the window generated for this transaction
="WO"+Name of the OBJect+Transaction code
Transaction type | Description | Object | WINREF | NOMWIN |
1 | Request for quote | PQH | OPQH | "WOPQH" + [F:PTR]PTRNUM |
2 | Purchase requests | PSH | OPSH | "WOPSH" + [F:PTR]PTRNUM |
3 | Orders | POH | OPOH | "WOPOH" + [F:PTR]PTRNUM |
5 | Open orders | POC | OPOC | "WOPOC" + [F:PTR]PTRNUM |
6 | Receipts | PTH | OPTH | "WOPTH" + [F:PTR]PTRNUM |
7 | Returns | PNH | OPNH | "WOPNH" + [F:PTR]PTRNUM |
8 | Invoices | PIH | OPIH | "WOPIH" + [F:PTR]PTRNUM |
9 | Subcontract orders | SCO | OSCO | "WOSCO" + [F:PTR]PTRNUM |
Table | Processing | Significant content | Table Title |
PURTRS | SUBPTA SUBPTD SUBPTE SUBPTC SUBPTT SUBPTR SUBPTN SUBPTF | Yes | Purchase entry transaction |
AWINDOW |
| Yes | Window dictionary |
The AWINDOW, AWINPAR, AWINBRO, AWINBOUT, AMSK, AMSKPAR, AMSKZON tables, as well as all tge tables required for the management of the screen generation and processes are open.
This entry point concerns the purchase entry transaction management. It is common to the transactions for request for quotes, purchase requests, subcontract orders, open orders, receipts, returns and invoices.
It is used to modify the browsers of the window generated by the transaction.
This entry point is located in the SUBPTX processing.
There is one transaction in progress. The GOK variable is used and tested. It is equal to 1. It can be set to 0 if the transaction is to be abandoned.
There is no open log file.
It is called in the CREATION, MODIF, and ANNULE actions in the processes :
- SUBPTA: Transactions for Requests for quote
- SUBPTD: Transactions for Purchase requests
- SUBPTE: Transactions for Subcontract orders
- SUBPTC: Transactions for Orders
- SUBPTT: Transactions for Open orders
- SUBPTR: Transactions Receipt
- SUBPTN: Transactions Supplier returns
- SUBPTF: Transactions Purchase invoices
Transaction | Entry screens
| Setup screens |
|
|
|
Requests for quote | PQH1: Request for quote screen | PTA0: Header screen |
|
| PTA1: Parameters 1 tab |
|
| PTA2: Parameters 2 tab |
|
|
|
Purchase requests | PSH0: Header screen | PTD0: Header screen |
| PSH1: Lines tab | PTD1: Parameters 1 tab |
|
| PTD2: Parameters 2 tab |
|
|
|
Subcontract orders | SCO0: Header screen | PTE0: Header screen |
| SCO1: Product management tab | PTE1: Parameters tab |
| SCO2: Materials tab | PTE2: Documents tab |
| SCO3: Service tab | PTE3: Entry tab |
|
|
|
Orders | POH0: Header screen | PTC0: Header screen |
| POH1: Management tab | PTC1: Parameters tab |
| POH2: Lines tab | PTC2: Header tab |
| POH3: Total tab | PTC3: Line 1 tab |
| POI1: Buyer plan screen | PTC4: Line 2 tab |
|
| PTX4: Line 3 tab |
|
|
|
Open orders | POC0: Header screen | PTT0: Header screen |
| POC1: Management tab | PTT1: Parameters tab |
| POC2: Product tab | PTT2: Header tab |
| POC3: Total tab | PTT3: Line 1 tab |
|
| PTX4: Line 2 tab |
|
|
|
Receipts | PTH1: Receipts screen | PTR0: Header screen |
|
| PTR1: Parameters tab |
|
| PTR2: Line 1 tab |
|
| PTR3: Line 2 tab |
|
| STOETR2: Stock tab |
|
|
|
Returns | PNH1: Returns screen | PTN0: Header screen |
|
| PTN1: Tab Parameters |
|
| PTN2: Line 1 tab |
|
| PTN3: Line 2 tab |
|
| PTN4: Line 3 tab |
|
|
|
Invoices | PIH0: Header screen | PTF0: Header screen |
| PIH1: Management tab | PTF1: Parameters tab |
| PIH3: Line tab | PTF2: Header tab |
| PIH4: Control tab | PTF3: Line tab |
The following variables are available to define the process to be carried out :
[F :AWB] The [F :AWB] class is loaded and can be modified if required to intervene on the browser of the generated window.
[F :PTR]PTRTYP Transaction type
[F :PTR]PTRNUM Transaction code
WINREF Name of the reference window
="O"+Name of the OBJect ("PQH", "PSH", "POH", "POC", "PTH", "PNH", "PIH", "SCO")
NOMWIN Name of the window generated for this transaction
="WO"+Name of the OBJect+Transaction code
Transaction type | Description | Object | WINREF | NOMWIN |
1 | Request for quote | PQH | OPQH | "WOPQH" + [F:PTR]PTRNUM |
2 | Purchase requests | PSH | OPSH | "WOPSH" + [F:PTR]PTRNUM |
3 | Orders | POH | OPOH | "WOPOH" + [F:PTR]PTRNUM |
5 | Open orders | POC | OPOC | "WOPOC" + [F:PTR]PTRNUM |
6 | Receipts | PTH | OPTH | "WOPTH" + [F:PTR]PTRNUM |
7 | Returns | PNH | OPNH | "WOPNH" + [F:PTR]PTRNUM |
8 | Invoices | PIH | OPIH | "WOPIH" + [F:PTR]PTRNUM |
9 | Subcontract orders | SCO | OSCO | "WOSCO" + [F:PTR]PTRNUM |
Table | Processing | Significant content | Table Title |
PURTRS | SUBPTA SUBPTD SUBPTE SUBPTC SUBPTT SUBPTR SUBPTN SUBPTF | Yes | Purchase entry transaction |
AWINDOW |
| Yes | Window dictionary |
The AWINDOW, AWINPAR, AWINBRO, AWINBOUT, AMSK, AMSKPAR, AMSKZON tables, as well as all tge tables required for the management of the screen generation and processes are open.