Process Get Tax Invoice No. – การกำหนดเลข Running No. ของเอกสาร Invoice
1. กำหนดเลข Running Screen: A/R Invoice, A/R Reserve Invoice, A/R Credit Memo, A/R Down Payment
1.1 การสร้างเลขที่ใบกำกับภาษี โดยกำหนด Get Tax Invoice No. = No, Tax Group = S0700I, S0000I, S0000E
![](https://i0.wp.com/online.nexcloudsolution.com/wp-content/uploads/2023/08/Pictures-THL-Gen-1.png?resize=895%2C385&ssl=1)
รูปที่ 1 ข้อมูลก่อนทำการ Addเอกสาร
![](https://i0.wp.com/online.nexcloudsolution.com/wp-content/uploads/2023/08/image.png?resize=895%2C382&ssl=1)
รูปที่ 2 หลังจากทำการ Add เอกสาร
จากรูปที่ 2จะเห็นว่าหลังจากทำการ Add เอกสารระบบมีการ Generate เลขที่ใบกำกับภาษีที่มาจากเลขที่เอกสารอัตโนมัติ
Function | Add Invoices | |||
Condition No. | Name | Field | Value | |
1 | Tax Code | INV1. “VatGroup” | S0700I, S0000I, S0000E (ไม่ลงท้ายด้วย S) | |
2 | Get Tax Invoice No. | OINV. “U_GetTaxINV” | N | |
Result No. | Field | Formula | Example | |
1 | Customer Ref No. | OINV. “NumAtCard” | NNM1.“BeginStr” + OINV. “DocNum” | IN23030010 |
1.2 การสร้างเลขที่ใบกำกับภาษี โดยกำหนด Get Tax Invoice No. = Yes (มี Setup OTAX Running),
Tax Group = S0700I,S0000I,S0000E
![](https://i0.wp.com/online.nexcloudsolution.com/wp-content/uploads/2023/08/Pictures-THL-Gen-3.png?resize=895%2C360&ssl=1)
รูปที่ 3 การกำหนด OTAX Running
![](https://i0.wp.com/online.nexcloudsolution.com/wp-content/uploads/2023/08/Pictures-THL-Gen-4.png?resize=895%2C379&ssl=1)
รูปที่ 4 ข้อมูลก่อนทำการ Add เอกสาร
![](https://i0.wp.com/online.nexcloudsolution.com/wp-content/uploads/2023/08/Pictures-THL-Gen-5.png?resize=895%2C381&ssl=1)
รูปที่ 5 หลังทำการ Add เอกสาร
จากรูปที่ 5 จะเห็นว่าหลังจากทำการ Add เอกสารระบบมีการ Generate เลขที่ใบกำกับภาษีที่กำหนดใน UDT: NX_RUNNING_OTAX ตามรูปที่ 3 มาให้อัตโนมัติ
Function | Add Invoices | |||
Condition No. | Name | Field | Value | |
1 | Tax Code | INV1. “VatGroup” | S0700I, S0000I, S0000E (ไม่ลงท้ายด้วย S) | |
2 | Get Tax Invoice No. | OINV. “U_GetTaxINV” | Y | |
3 | OUDT OTAX Running | Month + Tax Group มีค่าในตาราง | ||
Result No. | Field | Formula | Example | |
1 | Customer Ref No. | OINV. “NumAtCard” | OUDT OTAX Running ของ Month | INV-2023030006 |
1.3 การสร้างเลขที่ใบกำกับภาษี โดยกำหนด Get Tax Invoice No. = Yes (ไม่มี Setup OTAX Running), Tax Group = S0700I,S0000I,S0000E
![](https://i0.wp.com/online.nexcloudsolution.com/wp-content/uploads/2023/08/Pictures-THL-Gen-6.png?resize=895%2C360&ssl=1)
รูปที่ 6 การกำหนด OTAX Running
![](https://i0.wp.com/online.nexcloudsolution.com/wp-content/uploads/2023/08/Pictures-THL-Gen-7.png?resize=895%2C379&ssl=1)
รูปที่ 7 ข้อมูลก่อนทำการ Add เอกสาร
![](https://i0.wp.com/online.nexcloudsolution.com/wp-content/uploads/2023/08/Pictures-THL-Gen-8.png?resize=895%2C385&ssl=1)
รูปที่ 7 หลังทำการ Add เอกสาร
จากรูปที่ 7 จะเห็นว่าหลังจากทำการ Add เอกสารระบบมีการ Generate เลขที่ใบกำกับภาษีที่มาจากเลขที่เอกสารอัตโนมัติ เนื่องจาก Tax Code ที่ทำการเลือกไม่มีการกำหนดใน UDT: NX_RUNNING_OTAX
Function | Add Invoices | |||
Condition No. | Name | Field | Value | |
1 | Tax Code | INV1. “VatGroup” | S0700I, S0000I, S0000E (ไม่ลงท้ายด้วย S) | |
2 | Get Tax Invoice No. | OINV. “U_GetTaxINV” | Y | |
3 | OUDT OTAX Running | ไม่มีตั้งค่า Running ในตาราง | ||
Result No. | Field | Formula | Example | |
1 | Customer Ref No. | OINV. “NumAtCard” | NNM1.“BeginStr” + OINV. “DocNum” | IN23030011 |
1.4 การสร้างเลขที่ใบกำกับภาษี โดยกำหนด Get Tax Invoice No. = No, Tax Group= S0700S
![](https://i0.wp.com/online.nexcloudsolution.com/wp-content/uploads/2023/08/Pictures-THL-Gen-9.png?resize=895%2C383&ssl=1)
รูปที่ 8 ข้อมูลก่อนทำการ Add เอกสาร
![](https://i0.wp.com/online.nexcloudsolution.com/wp-content/uploads/2023/08/Pictures-THL-Gen-10.png?resize=895%2C385&ssl=1)
รูปที่ 9 หลังทำการ Add เอกสาร
จากรูปที่ 9 จะเห็นว่าหลังจากทำการ Add เอกสารระบบไม่มีการ Generate เลขที่ใบกำกับภาษีมาให้ เนื่องจากเป็นภาษียังไม่ถึงกำหนด 7%
Function | Add Invoices | |||
Condition No. | Name | Field | Value | |
1 | Tax Code | INV1. “VatGroup” | S0700S | |
2 | Get Tax Invoice No. | OINV. “U_GetTaxINV” | N | |
Result No. | Field | Formula | Example | |
1 | Customer Ref No. | OINV. “NumAtCard” | NULL |
1.5 การสร้างเลขที่ใบกำกับภาษี โดยกำหนด Get Tax Invoice No. = Yes, Tax Group= S0700S
![](https://i0.wp.com/online.nexcloudsolution.com/wp-content/uploads/2023/08/Pictures-THL-Gen-11.png?resize=895%2C385&ssl=1)
รูปที่ 10 ข้อมูลก่อนทำการ Add เอกสาร
![](https://i0.wp.com/online.nexcloudsolution.com/wp-content/uploads/2023/08/Pictures-THL-Gen-12.png?resize=895%2C385&ssl=1)
รูปที่ 11 หลังทำการ Add เอกสาร
จากรูปที่ 11 จะเห็นว่าหลังจากทำการ Add เอกสารระบบไม่มีการ Generate เลขที่ใบกำกับภาษีมาให้เนื่องจากเป็นภาษียังไม่ถึงกำหนด 7%
Function | Add Invoices | |||
Condition No. | Name | Field | Value | |
1 | Tax Code | INV1. “VatGroup” | S0700S | |
2 | Get Tax Invoice No. | OINV. “U_GetTaxINV” | Y | |
Result No. | Field | Formula | Example | |
1 | Customer Ref No. | OINV. “NumAtCard” | NULL |
2. กำหนดเลข Running Screen : Incoming Payment
2.1 การสร้างเลขที่ใบกำกับภาษี ของ Tax Group: S0700I,S0000I,S0000E ของ Incoming Payment
![](https://i0.wp.com/online.nexcloudsolution.com/wp-content/uploads/2023/08/Pictures-THL-Gen-13.png?resize=895%2C383&ssl=1)
รูปที่ 1 ข้อมูล Customer Ref No. ของเอกสาร Invoice
หากไปทำเอกสาร Incoming ระบบจะดึงข้อมูลจากช่อง Customer Ref No. ในเอกสาร Invoice ไปที่ช่อง Tax Invoice No. หมายความว่าถ้ามีข้อมูลในช่อง Customer Ref No. อยู่แล้วระบบจะใช้ข้อมูลตามเอกสารต้นทาง
![](https://i0.wp.com/online.nexcloudsolution.com/wp-content/uploads/2023/08/Pictures-THL-Gen-14.png?resize=895%2C385&ssl=1)
รูปที่ 2 เอกสาร Incoming
จากรูปที่ 2 จะเห็นว่าไม่มีการเปลี่ยนแปลงข้อมูลใน Tax Invoice No. เนื่องจากเป็นข้อมูลที่มาจากเอกสารต้นทาง
Function | Add Incoming Payment | |||
Condition No. | Name | Field | Value | |
1 | Get Tax Invoice No. | RCT2. “U_GetTaxINV” | “N” or “Y” | |
2 | Tax Invoice No. | RCT2. ”U_xRefNumAtCard” | มีค่า หรือ มีเลขที่ใบกำกับภาษีจาก OINV.”NumAtCard” แล้ว | |
Result No. | Field | Formula | Example | |
1 | Tax Invoice No. | RCT2. “U_xRefNumAtCard” | ใช้ค่าเดิมตามช่องนั้น | IN23020022 |
2 | Customer Ref No. | OINV. “NumAtCard” ORIN. “NumAtCard” ODPI. “NumAtCard” | ใช้ค่าเดิมตามช่องนั้น หรือ Update Invoice “NumAtCard เมื่อมีการเปลี่ยนแปลง |
2.2 การสร้างเลขที่ใบกำกับภาษีของ Tax Group: S0700S ซึ่งมีการกำหนด Get Tax Invoice No. = No ในเอกสาร Incoming Payment
![](https://i0.wp.com/online.nexcloudsolution.com/wp-content/uploads/2023/08/Pictures-THL-Gen-15.png?resize=895%2C384&ssl=1)
รูปที่ 3 ข้อมูล Customer Ref No. ของเอกสาร Invoice
หากไปทำเอกสาร Incoming ข้อมูลของ Tax Invoice No. จะยังไม่มีข้อมูล เนื่องจาก Customer Ref No. ของเอกสารต้นทางไม่มีข้อมูล
![](https://i0.wp.com/online.nexcloudsolution.com/wp-content/uploads/2023/08/Pictures-THL-Gen-16.png?resize=895%2C383&ssl=1)
รูปที่ 4 เอกสาร Incoming
จากรูปที่ 4 จะเห็นว่าหากเลือก Get Tax Invoice No. = No ระบบจะ Generate เลขที่ใบกำกับภาษีมาจากเลขที่เอกสาร Incoming อัตโนมัติ
Function | Add Incoming Payment | |||
Condition No. | Name | Field | Value | |
1 | Get Tax Invoice No. | RCT2. “U_GetTaxINV” | N | |
2 | Tax Invoice No. | RCT2. ”U_xRefNumAtCard” | ไม่มีค่า | |
Result No. | Field | Formula | Example | |
1 | Tax Invoice No. | RCT2.”U_xRefNumAtCard” | NNM1. ”BeginStr” + ORCT. “DocNum” | RC23020017 |
2 | Customer Ref No. | OINV. “NumAtCard” ORIN. “NumAtCard” ODPI. “NumAtCard” | NNM1. ”BeginStr” + ORCT. “DocNum” หรือ Update Invoice “NumAtCard เมื่อมีการเปลี่ยนแปลง |
หมายเหตุ หากย้อนกลับไปดูที่เอกสาร Invoice ระบบจะ Generate เลขที่ใบกำกับภาษีที่มาจาก Incoming อัตโนมัติ ดังภาพข้างล่าง
![](https://i0.wp.com/online.nexcloudsolution.com/wp-content/uploads/2023/08/Pictures-THL-Gen-17.png?resize=895%2C384&ssl=1)
2.3 การสร้างเลขที่ใบกำกับภาษี ของ Tax Group: S0700S ซึ่งมีการกำหนด Get Tax Invoice No. = Yes ในเอกสาร Incoming Payment
![](https://i0.wp.com/online.nexcloudsolution.com/wp-content/uploads/2023/08/Pictures-THL-Gen-18.png?resize=895%2C384&ssl=1)
รูปที่ 5 ข้อมูล Customer Ref No. ของเอกสาร Invoice
หากไปทำเอกสาร Incoming ข้อมูลของ Tax Invoice No. จะยังไม่มีข้อมูล เนื่องจาก Customer Ref No. ของเอกสารต้นทางไม่มีข้อมูล
![](https://i0.wp.com/online.nexcloudsolution.com/wp-content/uploads/2023/08/Pictures-THL-Gen-19.png?resize=895%2C379&ssl=1)
รูปที่ 6 การกำหนด OTAX Running
![](https://i0.wp.com/online.nexcloudsolution.com/wp-content/uploads/2023/08/Pictures-THL-Gen-20.png?resize=895%2C382&ssl=1)
รูปที่ 7 เอกสาร Incoming
จากรูปที่ 7 จะเห็นว่าหากเลือก Get Tax Invoice No. = Yes ระบบจะ Generate เลขที่ใบกำกับภาษีมาจากเลขที่กำหนดใน UDT: NX_RUNNING_OTAX ตามรูปที่ 6 ให้อัตโนมัติ
Function | Add Invoices | |||
Condition No. | Name | Field | Value | |
1 | Get Tax Invoice No. | RCT2. “U_GetTaxINV” | Y | |
2 | Tax Invoie No. | RCT2.”U_xRefNumAtCard” | ไม่มีค่า | |
3 | OUDT OTAX Running | Month + Tax Group | ||
Result No. | Field | Formula | Example | |
1 | Tax Invoice No. | RCT2.”U_xRefNumAtCard” | OUDT OTAX Running ของ Month | INV-2023030007 |
2 | Customer Ref No. | OINV. “NumAtCard” ORIN. “NumAtCard” ODPI. “NumAtCard” | OUDT OTAX Running ของ Month | INV-2023030007 |
หมายเหตุ หากย้อนกลับไปดูที่เอกสาร Invoice ระบบจะ Generate เลขที่ใบกำกับภาษีที่มาจาก Incoming อัตโนมัติ ดังภาพข้างล่าง
![](https://i0.wp.com/online.nexcloudsolution.com/wp-content/uploads/2023/08/Pictures-THL-Gen-21.png?resize=895%2C385&ssl=1)
การใช้งานของ Running WHT Tax
Running WHT Tax จะเริ่มทำงานก็ต่อเมื่อมีการทำเอกสารชำระเงิน(Outgoing Payment) ซึ่งจะมีการแบ่งแยกชุด Running จากประเภทที่ทำการระบุ (WTaxType) ใน UDT : NX_RUNNING_OWHT
![](https://i0.wp.com/online.nexcloudsolution.com/wp-content/uploads/2023/08/Pictures-THL-WHT-1.png?resize=895%2C509&ssl=1)
รูปที่ 1 ก่อนทำการ Add เอกสารชำระเงิน
![](https://i0.wp.com/online.nexcloudsolution.com/wp-content/uploads/2023/08/Pictures-THL-WHT-2.png?resize=895%2C507&ssl=1)
รูปที่ 2 หลังทำการชำระเงิน
จากรูปภาพที่ 2 จะเห็นว่าหลังจากที่ทำการ Add เอกสารชำระเงิน(Outgoing Payment) จะมีข้อมูลขึ้นมาอัตโนมัติ ซึ่งมาจากเลข Running ใน UDT : NX_RUNNING_OWHT