[ADMIN] คู่มือการเชื่อมต่อระบบขอเดินทางไปราชการ DPA Business Travel

[ADMIN] คู่มือการเชื่อมต่อระบบขอเดินทางไปราชการ DPA Business Travel

1.             ระบบขอเดินทางไปราชการ (DPA – Business Travel)

การขอเดินทางไปราชการ (หรือเบิกค่าใช้จ่ายการเดินทาง) ตั้งแต่เริ่มขออนุมัติในระบบ business Travel ไปจนถึงการสร้างเอกสารทางบัญชีใน ERP และการจ่ายเงิน โดยสามารถอธิบายขั้นตอนสรุปได้ดังนี้

1.1.                        เมื่อต้องการเดินทางไปราชการและต้องการเงินยืม

ขั้นตอนที่ 1: ระบบ DPA

·       ยื่นเรื่องเดินทางไปราชการในระบบ DPA เพื่อเช็คงบประมาณ

·       อนุมัติการเดินทาง

·       DPA ใช้ API สร้างรายการ PO และส่งไปยัง Oracle

ขั้นตอนที่ 2: ในระบบ Oracle ERP

·       Oracle รับรายการ PO ในสถานะ อนุมัติ จาก API ที่ส่งมาจาก DPA ซึ่งไม่จำเป็นต้องอนุมัติซ้ำอีกรอบในระบบ ERP

·       งบประมาณถูกจองในระบบ ERP

·       Oracle ส่งกลับเลข PO ไปยัง DPA โดยใช้ API เดิม

ขั้นตอนที่ 3 : จ่ายเงินล่วงหน้า

 

·       สร้างเงินยืมพร้อมแนบเอกสารอ้างอิง PO ในระบบเงินยืม เพื่อส่งอนุมัติ

·       เมื่อตรวจสอบสิทธิ์และอนุมัติแล้ว ระบบเงินยืมจะสร้าง prepayment ใบแจ้งหนี้ ใน AP

·       ทำจ่ายให้กับบุคลากรจากระบบ AP

·       เข้าสู่ระบบ DPA เพื่อกรอกข้อมูล Prepayment ใบแจ้งหนี้ เพื่อใช้อ้างอิงการเดินทางนั้น ๆ


 

7.1.1.                        รายละเอียด Payload ของ PO

HTTP Method

POST

Endpoint

https://iaajtj.fa.ocs.oraclecloud.com/fscmRestApi/resources/11.13.18.05/draftPurchaseOrders

Headers

Content-Type

application/json

Request Body

{

    "ProcurementBUId": 300000005501001,

    "RequisitioningBUId": 300000005501001,

    "Buyer": "PND Integration",

    "Supplier": "บริษัท ก-ฮ จำกัด",

    "Currency": "Baht",

    "SupplierSite": "HQ",

    "BillToLocation": "สำนักงานอธิการบดี",

    "DefaultShipToLocation": "สำนักงานอธิการบดี",

    "RequiredAcknowledgment": "None",

    "Description": "PO created using REST",

    "SupplierCommunicationMethod": "EMAIL",

    "SupplierEmailAddress": "TallManufacturing@example.com",

    "BuyerManagedTransportFlag": false,

    "PayOnReceiptFlag": "N",

    "PaymentTerms": "D30",

    "FreightTerms": null,

    "FOB": null,

    "NoteToReceiver": "This is a note to Receiver",

    "NoteToSupplier": "This is a note to Supplier",

    "Carrier": null,

    "DefaultTaxationCountryCode": "TH",

    "DefaultTaxationCountry": "Thailand",

    "OverridingApprover": "Approval Integration",

    "lines": [

        {

            "LineNumber": 1,

            "LineType": "Fixed Price Services",

            "Category": "INV_OTH01",

            "Description": "PO-Tst1",

            "Amount": 1,

            "schedules": [

                {

                    "ScheduleNumber": 1,

                    "Amount": 1,

                    "ShipToLocation": "สำนักงานอธิการบดี",

                    "ShipToOrganization": "INV01-สำนักงานอธิการบดี",

                    "ReceiptCloseTolerancePercent": 0,

                    "InvoiceMatchOptionCode": "P",

                    "InvoiceMatchOption": "Order",

                    "InspectionRequiredFlag": false,

                    "ReceiptRequiredFlag": false,

                    "MatchApprovalLevelCode": "2-Way",

                    "MatchApprovalLevel": "2 Way",

                    "EarlyReceiptToleranceDays": 0,

                    "InvoiceCloseTolerancePercent": 0,

                    "LateReceiptToleranceDays": 0,

                    "ReceiptRouting": "Direct delivery",

                    "DestinationTypeCode": "EXPENSE",

                    "Carrier": null,

                    "distributions": [

                        {

                            "DistributionNumber": 1,

                            "DeliverToLocation": "สำนักงานอธิการบดี",

                            "POChargeAccountId": 300000246110954,

                            "Amount": 1

                        }

                    ]

                }

            ]

        }

    ]

}

Response

{

  "POHeaderId" : 300000449325739,

  "OrderNumber" : "PUR-68002934",

  "Description" : "PO created using REST",

  "DocumentStyleId" : 1,

  "DocumentStyle" : "Purchase Order",

  "StatusCode" : "INCOMPLETE",

  "Status" : "Incomplete",

  "ProcurementBUId" : 300000005501001,

  "ProcurementBU" : "KKBU01-สำนักงานอธิการบดี",

  "RequisitioningBUId" : 300000005501001,

  "RequisitioningBU" : "KKBU01-สำนักงานอธิการบดี",

  "BuyerId" : 300000414770941,

  "Buyer" : "PND Integration",

  "BuyerEmail" : "natchaphonj@lanna.co.th",

  "CurrencyCode" : "THB",

  "Currency" : "Baht",

  "ConversionRateTypeCode" : null,

  "ConversionRateType" : null,

  "ConversionRateDate" : null,

  "ConversionRate" : null,

  "SupplierId" : 300000106540547,

  "Supplier" : "บริษัท ก-ฮ จำกัด",

  "SupplierSiteId" : 300000112020445,

  "SupplierSite" : "HQ",

  "SupplierCommunicationMethod" : "EMAIL",

  "SupplierFax" : null,

  "SupplierOrder" : null,

  "SupplierEmailAddress" : "TallManufacturing@example.com",

  "SoldToLegalEntityId" : 300000005500004,

  "SoldToLegalEntity" : "มหาวิทยาลัยขอนแก่น",

  "BillToBUId" : 300000005501001,

  "BillToBU" : "KKBU01-สำนักงานอธิการบดี",

  "BillToLocationId" : 300000011833192,

  "BillToLocation" : "สำนักงานอธิการบดี",

  "BillToLocationInternalCode" : "KKBU01",

  "DefaultShipToLocationId" : 300000011833192,

  "DefaultShipToLocation" : "สำนักงานอธิการบดี",

  "DefaultShipToLocationInternalCode" : "KKBU01",

  "MasterContractId" : null,

  "MasterContractNumber" : null,

  "MasterContractTypeId" : null,

  "MasterContractType" : null,

  "RequiredAcknowledgmentCode" : "N",

  "RequiredAcknowledgment" : "None",

  "AcknowledgmentDueDate" : null,

  "AcknowledgmentWithinDays" : null,

  "BuyerManagedTransportFlag" : false,

  "RequiresSignatureFlag" : false,

  "PendingSignatureFlag" : null,

  "PaymentTermsId" : 300000011762252,

  "PaymentTerms" : "D30",

  "FOBCode" : null,

  "FOB" : null,

  "FreightTermsCode" : null,

  "FreightTerms" : null,

  "SupplierContactId" : null,

  "SupplierContact" : null,

  "NoteToSupplier" : "This is a note to Supplier",

  "NoteToReceiver" : "This is a note to Receiver",

  "CarrierId" : null,

  "Carrier" : null,

  "ModeOfTransportCode" : null,

  "ModeOfTransport" : null,

  "ServiceLevelCode" : null,

  "ServiceLevel" : null,

  "ConfirmingOrderFlag" : false,

  "PayOnReceiptFlag" : false,

  "DocumentCreationMethod" : "PO_REST_SERVICE",

  "ShippingMethod" : null,

  "DefaultTaxationCountryCode" : "TH",

  "DefaultTaxationCountry" : "Thailand",

  "FirstPartyRegistrationId" : null,

  "FirstPartyRegistrationNumber" : null,

  "ThirdPartyRegistrationId" : null,

  "ThirdPartyRegistrationNumber" : null,

  "DocumentFiscalClassificationId" : null,

  "DocumentFiscalClassificationCode" : null,

  "DocumentFiscalClassification" : null,

  "BudgetaryControlEnabledFlag" : true,

  "CancelFlag" : null,

  "ChangeOrderNumber" : null,

  "ChangeOrderInitiatingParty" : null,

  "ChangeOrderDescription" : null,

  "ChangeOrderStatusCode" : null,

  "ChangeOrderStatus" : null,

  "ChangeOrderTypeCode" : null,

  "ChangeOrderType" : null,

  "ChangeRequestedBy" : null,

  "ContractTermsExistFlag" : null,

  "DuplicatedFromHeaderId" : null,

  "FundsStatus" : null,

  "FundsStatusCode" : null,

  "ImportSourceCode" : null,

  "ReferenceNumber" : null,

  "LastUpdateDate" : "2025-03-06T04:07:11.855+00:00",

  "LastUpdatedBy" : "pnd.user",

  "CreationDate" : "2025-03-06T04:07:03.001+00:00",

  "CreatedBy" : "pnd.user",

  "SupplierCCEmailAddress" : null,

  "SupplierBCCEmailAddress" : null,

  "OverridingApproverId" : 300000422542986,

  "OverridingApprover" : "Approval Integration",

  "OverrideB2BCommunicationFlag" : false,

  "hasPOlineswithMultipleDistributionsFlag" : false,

  "hasReceivedOrInvoicedSchedulesFlag" : false,

  "AdditionalContactEmail" : null,

  "SpecialHandlingType" : null,

  "SpecialHandlingTypeCode" : null,

  "lines" : [ {

    "POLineId" : 300000449325741,

    "LineNumber" : 1,

    "POHeaderId" : 300000449325739,

    "OrderNumber" : "PUR-68002934",

    "LineTypeId" : 6,

    "LineType" : "Fixed Price Services",

    "ItemId" : null,

    "Item" : null,

    "ItemRevision" : null,

    "CategoryId" : 300000011756128,

    "CategoryCode" : "INV_OTH01",

    "Category" : "INV_OTH01",

    "Description" : "PO-Tst1",

    "Amount" : 1,

    "Quantity" : null,

    "BasePrice" : 1,

    "DiscountType" : null,

    "Discount" : null,

    "DiscountReason" : null,

    "Price" : null,

    "UOMCode" : null,

    "UOM" : null,

    "PricingUOMCode" : null,

    "PricingUOM" : null,

    "CurrencyCode" : "THB",

    "Currency" : "Baht",

    "BaseModelId" : null,

    "BaseModel" : null,

    "BaseModelPrice" : null,

    "CancelDate" : null,

    "CancelFlag" : false,

    "CancelReason" : null,

    "CancelledBy" : null,

    "ChangeAcceptedFlag" : null,

    "ConfiguredItemFlag" : false,

    "ConsignmentLineFlag" : null,

    "SourceAgreementId" : null,

    "SourceAgreementNumber" : null,

    "SourceAgreementLineId" : null,

    "SourceAgreementLine" : null,

    "SourceAgreementTypeCode" : null,

    "SourceAgreementType" : null,

    "SourceAgreementProcurementBUId" : null,

    "SourceAgreementProcurementBU" : null,

    "ResponseLine" : null,

    "Response" : null,

    "NegotiationId" : null,

    "Negotiation" : null,

    "NegotiationLine" : null,

    "FundsStatusCode" : null,

    "FundsStatus" : null,

    "ManualPriceChangeFlag" : null,

    "NegotiatedFlag" : false,

    "NoteToSupplier" : null,

    "ReasonForChange" : null,

    "SupplierConfigurationId" : null,

    "SupplierItem" : null,

    "OptionsPrice" : null,

    "UNNumberCode" : null,

    "UNNumberId" : null,

    "UNNumber" : null,

    "UNNumberDescription" : null,

    "HazardClassCode" : null,

    "HazardClassId" : null,

    "HazardClass" : null,

    "WorkOrderProduct" : null,

    "TaxableFlag" : null,

    "ReferenceNumber" : null,

    "CancelUnfulfilledDemandFlag" : null,

    "CreationDate" : "2025-03-06T04:07:04.281+00:00",

    "CreatedBy" : "pnd.user",

    "LastUpdateDate" : "2025-03-06T04:07:10.708+00:00",

    "LastUpdatedBy" : "pnd.user",

    "MaximumRetainageAmount" : null,

    "Manufacturer" : null,

    "ManufacturerPartNumber" : null,

    "CreditFlag" : false,

    "schedules" : [ {

      "LineLocationId" : 300000449325742,

      "ScheduleNumber" : 1,

      "POLineId" : 300000449325741,

      "LineNumber" : 1,

      "POHeaderId" : 300000449325739,

      "OrderNumber" : "PUR-68002934",

      "Quantity" : null,

      "Amount" : 1,

      "ShipToOrganizationId" : 300000011842709,

      "ShipToOrganizationCode" : "INV01",

      "ShipToOrganization" : "INV01-สำนักงานอธิการบดี",

      "ShipToLocation" : "สำนักงานอธิการบดี",

      "ShipToLocationId" : 300000011833192,

      "ShipToLocationCode" : "สำนักงานอธิการบดี",

      "ShipToLocationInternalCode" : "KKBU01",

      "DestinationTypeCode" : "EXPENSE",

      "DestinationType" : "Expense",

      "LocationOfFinalDischargeId" : null,

      "LocationOfFinalDischargeCode" : null,

      "TransactionBusinessCategoryId" : null,

      "TransactionBusinessCategoryCode" : null,

      "TransactionBusinessCategory" : null,

      "UserDefinedFiscalClassificationCode" : null,

      "UserDefinedFiscalClassification" : null,

      "ProductFiscalClassificationId" : null,

      "ProductFiscalClassificationCode" : null,

      "ProductFiscalClassification" : null,

      "ProductCategoryCode" : null,

      "ProductCategory" : null,

      "LineIntendedUseId" : null,

      "LineIntendedUse" : null,

      "ProductTypeCode" : null,

      "ProductType" : null,

      "AssessableValue" : 1.00,

      "TaxClassificationCode" : null,

      "TaxClassification" : null,

      "InvoiceCloseTolerancePercent" : 0,

      "ReceiptCloseTolerancePercent" : 0,

      "EarlyReceiptToleranceDays" : 0,

      "LateReceiptToleranceDays" : 0,

      "AccrueAtReceiptFlag" : false,

      "ReceiptRoutingId" : 3,

      "ReceiptRouting" : "Direct delivery",

      "InvoiceMatchOptionCode" : "P",

      "InvoiceMatchOption" : "Order",

      "InspectionRequiredFlag" : false,

      "ReceiptRequiredFlag" : false,

      "MatchApprovalLevelCode" : "2-Way",

      "MatchApprovalLevel" : "2 Way",

      "AllowSubstituteReceiptsFlag" : false,

      "FirmFlag" : null,

      "OverReceiptTolerancePercent" : 0,

      "BackToBackFlag" : null,

      "NoteToReceiver" : null,

      "RequestedDeliveryDate" : null,

      "PromisedDeliveryDate" : null,

      "RequestedShipDate" : null,

      "PromisedShipDate" : null,

      "SalesOrderNumber" : null,

      "SalesOrderLineNumber" : null,

      "SalesOrderScheduleNumber" : null,

      "SecondaryQuantity" : null,

      "TaxableFlag" : null,

      "Carrier" : null,

      "CarrierId" : null,

      "CountryOfOrigin" : null,

      "CountryOfOriginCode" : null,

      "ShipToExceptionAction" : null,

      "ShipToExceptionActionCode" : "NONE",

      "FundsStatusCode" : null,

      "FundsStatus" : null,

      "ModeOfTransport" : null,

      "ModeOfTransportCode" : null,

      "CancelDate" : null,

      "CancelReason" : null,

      "CancelledBy" : null,

      "RejectedReason" : null,

      "ReasonForChange" : null,

      "ChangeAcceptedFlag" : null,

      "ChangeOrderAmountCancelled" : null,

      "ChangeOrderQuantityCancelled" : null,

      "CustomerItem" : null,

      "CustomerItemDescription" : null,

      "CustomerPOLineNumber" : null,

      "CustomerPONumber" : null,

      "CustomerPOScheduleNumber" : null,

      "CurrencyCode" : "THB",

      "Currency" : "Baht",

      "RejectedBy" : null,

      "RejectedByRole" : null,

      "CancelFlag" : false,

      "SecondaryUOMCode" : null,

      "SecondaryUOM" : null,

      "UOMCode" : null,

      "UOM" : null,

      "PricingUOMCode" : null,

      "PricingUOM" : null,

      "ReceiptDateExceptionActionCode" : "WARNING",

      "ReceiptDateExceptionAction" : null,

      "OverReceiptActionCode" : "REJECT",

      "OverReceiptAction" : null,

      "WorkOrderId" : null,

      "WorkOrderNumber" : null,

      "WorkOrderOperationId" : null,

      "WorkOrderOperationSequence" : null,

      "WorkOrderSubType" : null,

      "SupplierOrderLineNumber" : null,

      "OrchestrationAgreementLineNumber" : null,

      "OrchestrationAgreementNumber" : null,

      "PrimaryTradeRelationshipId" : null,

      "POTradingOrganizationId" : null,

      "POTradingOrganizationCode" : null,

      "POTradingOrganization" : null,

      "FirmStatusLookupCode" : null,

      "FirmStatus" : null,

      "ParentLineLocationId" : null,

      "ParentScheduleNumber" : null,

      "ShipToCustomerContactId" : null,

      "ShipToCustomerContact" : null,

      "ShipToCustomerId" : null,

      "ShipToCustomer" : null,

      "ShipToCustomerLocationId" : null,

      "ServiceLevelCode" : null,

      "ServiceLevel" : null,

      "CancelUnfulfilledDemandFlag" : null,

      "CreatedBy" : "pnd.user",

      "CreationDate" : "2025-03-06T04:07:07.133+00:00",

      "LastUpdateDate" : "2025-03-06T04:07:10.745+00:00",

      "LastUpdatedBy" : "pnd.user",

      "ShippingMethod" : null,

      "RetainageRate" : null,

      "LastAcceptableDeliveryDate" : null,

      "LastAcceptableShipDate" : null,

      "OriginalPromisedDeliveryDate" : null,

      "OriginalPromisedShipDate" : null,

      "Type" : null,

      "Description" : null,

      "Price" : null,

      "TypeCode" : null,

      "distributions" : [ {

        "PODistributionId" : 300000449325743,

        "DistributionNumber" : 1,

        "POHeaderId" : 300000449325739,

        "OrderNumber" : "PUR-68002934",

        "POLineId" : 300000449325741,

        "LineNumber" : 1,

        "LineLocationId" : 300000449325742,

        "ScheduleNumber" : 1,

        "Quantity" : null,

        "Amount" : 1,

        "DeliverToLocationId" : 300000011833192,

        "DeliverToLocationCode" : "สำนักงานอธิการบดี",

        "DeliverToLocationInternalCode" : "KKBU01",

        "DeliverToLocation" : "สำนักงานอธิการบดี",

        "POChargeAccountId" : 300000246110954,

        "POChargeAccount" : "1-01-00906-1105032100-02-0000-2001-002047-131093-0-2568",

        "POAccrualAccountId" : null,

        "POAccrualAccount" : null,

        "POVarianceAccountId" : null,

        "POVarianceAccount" : null,

        "DestinationChargeAccountId" : null,

        "DestinationChargeAccount" : null,

        "DestinationVarianceAccountId" : null,

        "DestinationVarianceAccount" : null,

        "RecoverableInclusiveTax" : null,

        "RecoverableExclusiveTax" : null,

        "NonrecoverableInclusiveTax" : null,

        "NonrecoverableExclusiveTax" : null,

        "ConversionRate" : null,

        "ConversionRateDate" : null,

        "CurrencyCode" : "THB",

        "Currency" : "Baht",

        "UOM" : null,

        "BudgetDate" : "2025-03-06",

        "ChangeAcceptedFlag" : null,

        "ChangeOrderAmountCancelled" : null,

        "ChangeOrderQuantityCancelled" : null,

        "DeliverToCustomerContactId" : null,

        "DeliverToCustomerContact" : null,

        "DeliverToCustomerId" : null,

        "DeliverToCustomer" : null,

        "DeliverToCustomerLocationId" : null,

        "RequesterId" : null,

        "Requester" : null,

        "DestinationSubinventory" : null,

        "FundsStatusCode" : null,

        "FundsStatus" : null,

        "ParentDistributionId" : null,

        "ParentDistributionNumber" : null,

        "ReasonForChange" : null,

        "RequisitionHeaderId" : null,

        "Requisition" : null,

        "RequisitionLineId" : null,

        "RequisitionLine" : null,

        "RequisitionDistributionId" : null,

        "RequisitionDistribution" : null,

        "CreationDate" : "2025-03-06T04:07:08.291+00:00",

        "CreatedBy" : "pnd.user",

        "LastUpdateDate" : "2025-03-06T04:07:10.846+00:00",

        "LastUpdatedBy" : "pnd.user",

        "UOMCode" : null,

        "links" : [ {…} ]

}

 

**หลังจากสร้าง PO แล้วให้ทำการส่ง API เพื่อ Approve PO**

HTTP Method

POST

Endpoint

https://iaajtj.fa.ocs.oraclecloud.com/fscmRestApi/resources/11.13.18.05/draftPurchaseOrders/<POHeaderId>

Headers

Content-Type

application/vnd.oracle.adf.action+json

Request Body

{

    "name": "submit",

    "parameters": [

        {

            "bypassApprovalsFlag": "true"

        }

    ]

}

Response

                {

    "result": "SUCCESS"

}

**การยกเลิก PO จะทำได้โดยต้อง Approve PO นั้นก่อน**

HTTP Method

POST

Endpoint

https://iaajtj.fa.ocs.oraclecloud.com/fscmRestApi/resources/11.13.18.05/draftPurchaseOrders/<POHeaderId>

Headers

Content-Type

application/vnd.oracle.adf.action+json

Request Body

{

    "name": "cancel",

    "parameters": [

        {

            "cancellationReason": "No longer required"

        },

        {

            "initiatingParty": "buyer"

        }

    ]

}

Response

{

    "result": "SUCCESS"

}

1.2.                        หลังจากเดินทางกลับจากราชการ (ต้องการเงินยืม)

 

ขั้นตอนที่ 1: ยื่นเอกสารค่าใช้จ่ายในระบบ DPA

 

·       ยื่นเอกสารค่าใช้จ่ายในระบบ DPA เพื่อยื่นอนุมัติ

·       ระบบ DPA จะสร้าง AP ใบแจ้งหนี้ โดยอัตโนมัติด้วยสถานะ Never Validated โดยใช้ API และส่งไปยัง Oracle

ขั้นตอนที่ 2: การประมวลรายงานค่าใช้จ่าย

 

·       ใบ AP ใบแจ้งหนี้ ถูกสร้างในระบบ ERP จาก API ที่ส่งมาจากระบบ DPA และจับคู่กับใบ PO หลังจากนั้น Oracle จะตอบกลับ DPA ด้วย ใบแจ้งหนี้ number

·       เจ้าหน้าที่การเงินจะต้องตรวจสอบรายละเอียดทั้งหมดและทำการ ตรวจสอบ ใบแจ้งหนี้หลังจากนั้นส่งใบใบแจ้งหนี้ ไปเพื่อตัดงบประมาณจากงบที่จองไว้ ในระบบ ERP

·       อนุมัติใบแจ้งหนี้

·       เจ้าหน้าที่การเงินจับคู่ใบแจ้งหนี้มาตรฐาน กับ ใบแจ้งหนี้ prepayment ที่ได้กรอกไว้ในระบบ DPA ก่อนเดินทางไปราชการ (ขั้นตอนที่3) เพื่อเคลียร์ค่าใช้จ่ายในจำนวนเงินที่ได้จ่ายไปก่อนหน้านี้แล้ว

·       จ่ายเงินที่เหลือ

ขั้นตอนที่ 3: ปิดเงินยืมในระบบ

· เข้าสู่ระบบเงินยืมและกรอกรายละเอียดการเคลียร์ค่าใช้จ่ายสัญญาเงินยืม

· กดปุ่ม ปิด เพื่อสิ้นสุดสัญญาเงินยืม

· กดเลือกประเภท Exceptional

· กรอกรายละเอียดว่า บุคลากรได้ชำระบิลยอดเงินยืม

· ปิดเงินยืม

 

ขั้นตอนที่ 4: หากมียอดเงินคงเหลือที่รอชำระจากบุคลากร

· กดปุ่ม เริ่มต้นชำระเงินยืม (Initiate payment) ในระบบ ERP

· หลักจากนั้นระบบจะสร้าง ใบแจ้งหนี้ลูกหนี้ อัตโนมัติ

· เจ้าหน้าที่จัดทำใบเสร็จรับเงินแบบมาตรฐานและจับคู่กับใบแจ้งหนี้ลูกหนี้ที่ระบบสร้างให้

· ระบบจะอัพเดทรายละเอียดใบเสร็จและส่งกลับไปยังระบบเงินยืมเพื่อสร้าง ใบแจ้งหนี้ที่ระบบ AP

· เจ้าหน้าที่การเงินจับคู่ ใบแจ้งหนี้ที่ระบบ AP กับยอดเงินคงเหลือจากเงินยืมใน ใบแจ้งหนี้ prepaid


 

1.2.1.                        รายละเอียด Payload ของ AP Invoice

HTTP Method

POST

Endpoint

https://iaajtj.fa.ocs.oraclecloud.com/fscmRestApi/resources/11.13.18.05/invoices

Headers

Content-Type

application/json

Request Body

{

    "InvoiceNumber": "ap_inv_004",

    "InvoiceCurrency": "THB",

    "InvoiceAmount": 1,

    "InvoiceDate": "2025-01-20",

    "BusinessUnit": "KKBU01-สำนักงานอธิการบดี",

    "Supplier": "หจก. เอ็ม แอนด์ จี ซิสเต็ม",

    "SupplierSite": "HQ",

    "Description": "Office Supplies",

    "TermsDate": "2025-01-20",

    "PurchaseOrderNumber": "<OrderNumber from create PO>",

    "invoiceLines": [

        {

            "LineNumber": "1",

            "LineType": "Item",

            "LineAmount": "1",

            "PurchaseOrderNumber": "<OrderNumber from create PO >",

            "PurchaseOrderLineNumber": "1",

            "PurchaseOrderScheduleLineNumber": "1"

        }

    ]

}

Response

{

    "InvoiceId": 300000171672144,

    "InvoiceNumber": "ap_inv_004",

    "InvoiceCurrency": "THB",

    "PaymentCurrency": "THB",

    "InvoiceAmount": 1,

    "InvoiceDate": "2025-01-20",

    "BusinessUnit": "KKBU01-สำนักงานอธิการบดี",

    "Supplier": "หจก. เอ็ม แอนด์ จี ซิสเต็ม",

    "SupplierNumber": "0403545002183",

    "ProcurementBU": null,

    "SupplierSite": "HQ",

    "RequesterId": null,

    "Requester": null,

    "InvoiceGroup": null,

    "ConversionRateType": null,

    "ConversionDate": null,

    "ConversionRate": null,

    "AccountingDate": "2025-01-20",

    "Description": "Office Supplies",

    "DeliveryChannelCode": null,

    "DeliveryChannel": null,

    "PayAloneFlag": false,

    "InvoiceSourceCode": "External",

    "InvoiceSource": null,

    "InvoiceType": null,

    "PayGroup": null,

    "InvoiceReceivedDate": null,

    "PaymentReasonCode": null,

    "PaymentReason": null,

    "PaymentReasonComments": null,

    "RemittanceMessageOne": null,

    "RemittanceMessageTwo": null,

    "RemittanceMessageThree": null,

    "PaymentTerms": null,

    "TermsDate": "2025-01-20",

    "GoodsReceivedDate": null,

    "PaymentMethodCode": "Bank Transfer",

    "PaymentMethod": null,

    "SupplierTaxRegistrationNumber": null,

    "FirstPartyTaxRegistrationId": 300000005334360,

    "FirstPartyTaxRegistrationNumber": "0994000391609",

    "LegalEntity": "มหาวิทยาลัยขอนแก่น",

    "LegalEntityIdentifier": null,

    "LiabilityDistribution": "1-01-00000-2101010200-00-0000-0000-000000-000000-0-0000",

    ...

    "invoiceLines": [

        {

            "LineNumber": 1,

            "LineAmount": 1,

            "AccountingDate": "2025-01-20",

            ...

            "links": [

                {

                    "rel": "self",

                    "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/invoices/300000171672144/child/invoiceLines/00020000000EACED00057708000110D93BAA42500000000AACED0005770400000001",

                    "name": "invoiceLines",

                    "kind": "item",

                    "properties": {

                        "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"

                    }

                },

                ...

            ]

        }

    ],

    "links": [

        {

            "rel": "self",

            "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/invoices/300000171672144",

            "name": "invoices",

            "kind": "item",

            "properties": {

                "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000278"

            }

        },

        ...

        {

            "rel": "child",

            "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/invoices/300000171672144/child/invoiceLines",

            "name": "invoiceLines",

            "kind": "collection"

        }

    ]

}

 


 

1.3.                   เมื่อต้องการเดินทางไปราชการแต่ไม่ต้องการเงินยืม

ขั้นตอนที่ 1 : ในระบบ DPA

 

·       ยื่นเรื่องเดินทางไปราชการในระบบ DPA เพื่อเช็คงบประมาณ

·       อนุมัติการเดินทาง

·       DPA ใช้ API สร้างรายการ PO และส่งไปยัง Oracle

ขั้นตอนที่ 2: ในระบบ Oracle ERP

 

·       Oracle รับรายการ PO ในสถานะ อนุมัติ จาก API ที่ส่งมาจาก DPA ซึ่งไม่จำเป็นต้องอนุมัติซ้ำอีกรอบในระบบ ERP

·       งบประมาณถูกจองในระบบ ERP

·       Oracle ส่งกลับเลข PO โดยใช้ API เดิม

**รายละเอียด Payload ของ PO

HTTP Method

POST

Endpoint

https://iaajtj.fa.ocs.oraclecloud.com/fscmRestApi/resources/11.13.18.05/draftPurchaseOrders

Headers

Content-Type

application/json

Request Body

{

    "ProcurementBUId": 300000005501001,

    "RequisitioningBUId": 300000005501001,

    "Buyer": "LC.FIN",

    "Supplier": "หจก. เอ็ม แอนด์ จี ซิสเต็ม",

    "Currency": "Baht",

    "SupplierSite": "HQ",

    "BillToLocation": "สำนักงานอธิการบดี",

    "DefaultShipToLocation": "สำนักงานอธิการบดี",

    "RequiredAcknowledgment": "None",

    "Description": "PO created using REST",

    "SupplierCommunicationMethod": "EMAIL",

    "SupplierEmailAddress": "TallManufacturing@example.com",

    "BuyerManagedTransportFlag": false,

    "PayOnReceiptFlag": "N",

    "PaymentTerms": "D30",

    "FreightTerms": null,

    "FOB": null,

    "NoteToReceiver": "This is a note to Receiver",

    "NoteToSupplier": "This is a note to Supplier",

    "Carrier": null,

    "DefaultTaxationCountryCode": "TH",

    "DefaultTaxationCountry": "Thailand",

    "lines": [

        {

            "LineNumber": 1,

            "LineType": "Fixed Price Services",

            "Category": "INV_001",

            "Description": "PO-Tst1",

            "Amount": 1,

            "schedules": [

                {

                    "ScheduleNumber": 1,

                    "Amount": 100,

                    "ShipToLocation": "กองกฎหมาย ชั้น 4 อาคารสิริคุณากร",

                    "ShipToOrganization": "INV01-สำนักงานอธิการบดี",

                    "ReceiptCloseTolerancePercent": 0,

                    "InvoiceMatchOptionCode": "P",

                    "InvoiceMatchOption": "Order",

                    "InspectionRequiredFlag": false,

                    "ReceiptRequiredFlag": false,

                    "MatchApprovalLevelCode": "2-Way",

                    "MatchApprovalLevel": "2 Way",

                    "EarlyReceiptToleranceDays": 0,

                    "InvoiceCloseTolerancePercent": 0,

                    "LateReceiptToleranceDays": 0,

                    "ReceiptRouting": "Direct delivery",

                    "DestinationTypeCode": "EXPENSE",

                    "Carrier": null,

                    "distributions": [

                        {

                            "DistributionNumber": 1,

                            "DeliverToLocation": "กองกฎหมาย ชั้น 4 อาคารสิริคุณากร",

                            "POChargeAccountId": 300000048117268,

                            "Amount": 1

                        }

                    ]

                }

            ]

        }

    ]

}

Response

{

    "POHeaderId": 300000170865919,

    "OrderNumber": "PUR-68000204",

    "Description": "PO created using REST",

    "DocumentStyleId": 1,

    "DocumentStyle": "Purchase Order",

    "StatusCode": "INCOMPLETE",

    "Status": "Incomplete",

    "ProcurementBUId": 300000005501001,

    "ProcurementBU": "KKBU01-สำนักงานอธิการบดี",

    "RequisitioningBUId": 300000005501001,

    "RequisitioningBU": "KKBU01-สำนักงานอธิการบดี",

    "BuyerId": 300000021805716,

    "Buyer": "LC.FIN",

    "BuyerEmail": "natchaphonj@lanna.co.th",

    "CurrencyCode": "THB",

    "Currency": "Baht",

    "ConversionRateTypeCode": null,

    "ConversionRateType": null,

    "ConversionRateDate": null,

    "ConversionRate": null,

    "SupplierId": 300000024316976,

    "Supplier": "หจก. เอ็ม แอนด์ จี ซิสเต็ม",

    "SupplierSiteId": 300000108050955,

    "SupplierSite": "HQ",

    "SupplierCommunicationMethod": "EMAIL",

    "SupplierFax": null,

    "SupplierOrder": null,

    "SupplierEmailAddress": "TallManufacturing@example.com",

    "SoldToLegalEntityId": 300000005500004,

    "SoldToLegalEntity": "มหาวิทยาลัยขอนแก่น",

    "BillToBUId": 300000005501001,

    "BillToBU": "KKBU01-สำนักงานอธิการบดี",

    "BillToLocationId": 300000011833192,

    "BillToLocation": "สำนักงานอธิการบดี",

    "BillToLocationInternalCode": "KKBU01",

    "DefaultShipToLocationId": 300000011833192,

    "DefaultShipToLocation": "สำนักงานอธิการบดี",

    "DefaultShipToLocationInternalCode": "KKBU01",

    "MasterContractId": null,

    "MasterContractNumber": null,

    "MasterContractTypeId": null,

    "MasterContractType": null,

    "RequiredAcknowledgmentCode": "N",

    "RequiredAcknowledgment": "None",

    "AcknowledgmentDueDate": null,

    "AcknowledgmentWithinDays": null,

    "BuyerManagedTransportFlag": false,

    "RequiresSignatureFlag": false,

    "PendingSignatureFlag": null,

    "PaymentTermsId": 300000011762252,

    "PaymentTerms": "D30",

    "FOBCode": null,

    "FOB": null,

    "FreightTermsCode": null,

    "FreightTerms": null,

    "SupplierContactId": null,

    "SupplierContact": null,

    "NoteToSupplier": "This is a note to Supplier",

    "NoteToReceiver": "This is a note to Receiver",

    "CarrierId": null,

    "Carrier": null,

    "ModeOfTransportCode": null,

    "ModeOfTransport": null,

    "ServiceLevelCode": null,

    "ServiceLevel": null,

    "ConfirmingOrderFlag": false,

    "PayOnReceiptFlag": false,

    "DocumentCreationMethod": "PO_REST_SERVICE",

    "ShippingMethod": null,

    "DefaultTaxationCountryCode": "TH",

    "DefaultTaxationCountry": "Thailand",

    "FirstPartyRegistrationId": null,

    "FirstPartyRegistrationNumber": null,

    "ThirdPartyRegistrationId": null,

    "ThirdPartyRegistrationNumber": null,

    "DocumentFiscalClassificationId": null,

    "DocumentFiscalClassificationCode": null,

    "DocumentFiscalClassification": null,

    "BudgetaryControlEnabledFlag": true,

    "CancelFlag": null,

    "ChangeOrderNumber": null,

    "ChangeOrderInitiatingParty": null,

    "ChangeOrderDescription": null,

    "ChangeOrderStatusCode": null,

    "ChangeOrderStatus": null,

    "ChangeOrderTypeCode": null,

    "ChangeOrderType": null,

    "ChangeRequestedBy": null,

    "ContractTermsExistFlag": null,

    "DuplicatedFromHeaderId": null,

    "FundsStatus": null,

    "FundsStatusCode": null,

    "ImportSourceCode": null,

    "ReferenceNumber": null,

    "LastUpdateDate": "2025-01-20T09:41:08.754+00:00",

    "LastUpdatedBy": "pnd.user",

    "CreationDate": "2025-01-20T09:41:08.001+00:00",

    "CreatedBy": "pnd.user",

    "SupplierCCEmailAddress": null,

    "SupplierBCCEmailAddress": null,

    "OverridingApproverId": null,

    "OverridingApprover": null,

    "OverrideB2BCommunicationFlag": false,

    "hasPOlineswithMultipleDistributionsFlag": false,

    "hasReceivedOrInvoicedSchedulesFlag": false,

    "AdditionalContactEmail": null,

    "SpecialHandlingType": null,

    "SpecialHandlingTypeCode": null,

    "lines": [

        {

            "POLineId": 300000170865921,

            "LineNumber": 1,

            ...

            "CreditFlag": false,

            "schedules": [

                {

                    "LineLocationId": 300000170865922,

                    "ScheduleNumber": 1,

                    "POLineId": 300000170865921,

                    "Amount": 1,

                    ...

                    "distributions": [

                        {

                            "PODistributionId": 300000170865923,

                            "DistributionNumber": 1,

                            "POHeaderId": 300000170865919,

                            "OrderNumber": "PUR-68000204",

                            "POLineId": 300000170865921,

                            "LineNumber": 1,

                            "LineLocationId": 300000170865922,

                            "ScheduleNumber": 1,

                            "Quantity": null,

                            "Amount": 1,

                            ...

                            "links": [

                                {

                                    "rel": "self",

                                    "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/draftPurchaseOrders/300000170865919/child/lines/300000170865921/child/schedules/300000170865922/child/distributions/300000170865923",

                                    "name": "distributions",

                                    "kind": "item",

                                    "properties": {

                                        "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"

                                    }

                                },

                                ...

                            ]

                        }

                    ],

                    "links": [

                        {

                            "rel": "self",

                            "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/draftPurchaseOrders/300000170865919/child/lines/300000170865921/child/schedules/300000170865922",

                            "name": "schedules",

                            "kind": "item",

                            "properties": {

                                "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"

                            }

                        },

                        ...

                    ]

                }

            ],

            "links": [

                {

                    "rel": "self",

                    "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/draftPurchaseOrders/300000170865919/child/lines/300000170865921",

                    "name": "lines",

                    "kind": "item",

                    "properties": {

                        "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"

                    }

                },

                ...

            ]

        }

    ],

    "links": [

        {

            "rel": "self",

            "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/draftPurchaseOrders/300000170865919",

            "name": "draftPurchaseOrders",

            "kind": "item",

            "properties": {

                "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000278"

            }

        },

        ...

    ]

}

 


 

**หลังจากสร้าง PO แล้วให้ทำการส่ง API เพื่อ Approve PO**

HTTP Method

POST

Endpoint

https://iaajtj.fa.ocs.oraclecloud.com/fscmRestApi/resources/11.13.18.05/draftPurchaseOrders/<POHeaderId>

Headers

Content-Type

application/vnd.oracle.adf.action+json

Request Body

{

    "name": "submit",

    "parameters": [

        {

            "bypassApprovalsFlag": "true"

        }

    ]

}

Response

                {

    "result": "SUCCESS"

}

 


 

**การยกเลิก PO จะทำได้โดยต้อง Approve PO นั้นก่อน**

HTTP Method

POST

Endpoint

https://iaajtj.fa.ocs.oraclecloud.com/fscmRestApi/resources/11.13.18.05/purchaseOrders/<POHeaderId>

Headers

Content-Type

application/vnd.oracle.adf.action+json

Request Body

{

    "name": "cancel",

    "parameters": [

        {

            "cancellationReason": "No longer required"

        },

        {

            "initiatingParty": "buyer"

        }

    ]

}

Response

{

    "result": "SUCCESS"

}

 


 

1.4.          หลังจากเดินทางกลับจากราชการ (ไม่ต้องการเงินยืม)

 

ขั้นตอนที่1 : ยื่นค่ารายงานค่าใช้จ่ายในระบบ DPA

·       ยื่นเอกสารค่าใช้จ่ายในระบบ DPA เพื่อยื่นอนุมัติ

·      ระบบ DPA จะสร้าง AP ใบแจ้งหนี้ โดยอัตโนมัติด้วยสถานะ Never Validated โดยใช้ API และส่งไปยัง Oracle

ขั้นตอนที่ 2: การประมวลรายงานค่าใช้จ่าย

 

·       ใบ AP ใบแจ้งหนี้ ถูกสร้างในระบบ ERP จาก API ที่ส่งมาจากระบบ DPA และจับคู่กับใบ PO หลังจากนั้น Oracle จะตอบกลับ DPA ด้วย ใบแจ้งหนี้ number

·       เจ้าหน้าที่การเงินจะต้องตรวจสอบรายละเอียดทั้งหมดและทำการ validate ใบ ใบแจ้งหนี้ หลังจากนั้นส่งใบ ใบแจ้งหนี้ ไปเพื่อหักลบงบประมาณจากงบที่จองไว้

·       อนุมัติใบแจ้งหนี้

·       ทำจ่ายคืนให้กับบุคลากร

** รายละเอียด Payload ของ AP Invoice

HTTP Method

POST

Endpoint

https://iaajtj.fa.ocs.oraclecloud.com/fscmRestApi/resources/11.13.18.05/invoices

Headers

Content-Type

application/json

Request Body

{

    "InvoiceNumber": "ap_inv_004",

    "InvoiceCurrency": "THB",

    "InvoiceAmount": 1,

    "InvoiceDate": "2025-01-20",

    "BusinessUnit": "KKBU01-สำนักงานอธิการบดี",

    "Supplier": "หจก. เอ็ม แอนด์ จี ซิสเต็ม",

    "SupplierSite": "HQ",

    "Description": "Office Supplies",

    "TermsDate": "2025-01-20",

    "PurchaseOrderNumber": "<OrderNumber from create PO>",

    "invoiceLines": [

        {

            "LineNumber": "1",

            "LineType": "Item",

            "LineAmount": "1",

            "PurchaseOrderNumber": "<OrderNumber from create PO >",

            "PurchaseOrderLineNumber": "1",

            "PurchaseOrderScheduleLineNumber": "1"

        }

    ]

}

Response

{

    "InvoiceId": 300000171672144,

    "InvoiceNumber": "ap_inv_004",

    "InvoiceCurrency": "THB",

    "PaymentCurrency": "THB",

    "InvoiceAmount": 1,

    "InvoiceDate": "2025-01-20",

    "BusinessUnit": "KKBU01-สำนักงานอธิการบดี",

    "Supplier": "หจก. เอ็ม แอนด์ จี ซิสเต็ม",

    "SupplierNumber": "0403545002183",

    "ProcurementBU": null,

    "SupplierSite": "HQ",

    "RequesterId": null,

    "Requester": null,

    "InvoiceGroup": null,

    "ConversionRateType": null,

    "ConversionDate": null,

    "ConversionRate": null,

    "AccountingDate": "2025-01-20",

    "Description": "Office Supplies",

    "DeliveryChannelCode": null,

    "DeliveryChannel": null,

    "PayAloneFlag": false,

    "InvoiceSourceCode": "External",

    "InvoiceSource": null,

    "InvoiceType": null,

    "PayGroup": null,

    "InvoiceReceivedDate": null,

    "PaymentReasonCode": null,

    "PaymentReason": null,

    "PaymentReasonComments": null,

    "RemittanceMessageOne": null,

    "RemittanceMessageTwo": null,

    "RemittanceMessageThree": null,

    "PaymentTerms": null,

    "TermsDate": "2025-01-20",

    "GoodsReceivedDate": null,

    "PaymentMethodCode": "Bank Transfer",

    "PaymentMethod": null,

    "SupplierTaxRegistrationNumber": null,

    "FirstPartyTaxRegistrationId": 300000005334360,

    "FirstPartyTaxRegistrationNumber": "0994000391609",

    "LegalEntity": "มหาวิทยาลัยขอนแก่น",

    "LegalEntityIdentifier": null,

    "LiabilityDistribution": "1-01-00000-2101010200-00-0000-0000-000000-000000-0-0000",

    ...

    "invoiceLines": [

        {

            "LineNumber": 1,

            "LineAmount": 1,

            "AccountingDate": "2025-01-20",

            ...

            "links": [

                {

                    "rel": "self",

                    "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/invoices/300000171672144/child/invoiceLines/00020000000EACED00057708000110D93BAA42500000000AACED0005770400000001",

                    "name": "invoiceLines",

                    "kind": "item",

                    "properties": {

                        "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"

                    }

                },

                ...

            ]

        }

    ],

    "links": [

        {

            "rel": "self",

            "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/invoices/300000171672144",

            "name": "invoices",

            "kind": "item",

            "properties": {

                "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000278"

            }

        },

        ...

        {

            "rel": "child",

            "href": "https://iaajtj-dev1.fa.ocs.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/invoices/300000171672144/child/invoiceLines",

            "name": "invoiceLines",

            "kind": "collection"

        }

    ]

}

 

1.5.               อธิบาย Parameter ในการส่งข้อมูล

1.5.1.              Parameter สำหรับสร้าง PO

เอกสารอธิบาย Parameter สำหรับ PO ที่สร้างด้วย REST API

ชื่อ Parameter

คำอธิบาย

ProcurementBUId

หมายเลข ID ของหน่วยงานที่ดูแลการจัดซื้อ เช่น 300000005501001

RequisitioningBUId

หมายเลข ID ของหน่วยงานที่ร้องขอการจัดซื้อ เช่น 300000005501001

Buyer

ชื่อผู้จัดซื้อ เช่น "LC.FIN"

Supplier

ชื่อผู้จำหน่าย เช่น "หจก. เอ็ม แอนด์ จี ซิสเต็ม"

Currency

สกุลเงิน เช่น "Baht"

SupplierSite

ชื่อสถานที่ของผู้จำหน่าย เช่น "HQ"

BillToLocation

ที่อยู่สำหรับส่งใบแจ้งหนี้ เช่น "สำนักงานอธิการบดี"

DefaultShipToLocation

ที่อยู่เริ่มต้นสำหรับจัดส่งสินค้า เช่น "สำนักงานอธิการบดี"

RequiredAcknowledgment

การยืนยันที่ต้องการ เช่น "None"

Description

รายละเอียดคำสั่งซื้อ เช่น "PO created using REST"

SupplierCommunicationMethod

วิธีการสื่อสารกับผู้จำหน่าย เช่น "EMAIL"

SupplierEmailAddress

อีเมลของผู้จำหน่าย เช่น "TallManufacturing@example.com"

BuyerManagedTransportFlag

ค่ากำหนดการจัดการการขนส่งโดยผู้จัดซื้อ (true/false) เช่น false

PayOnReceiptFlag

ตัวเลือกการชำระเงินเมื่อได้รับสินค้า เช่น "N"

PaymentTerms

เงื่อนไขการชำระเงิน เช่น "D30" (ชำระใน 30 วัน)

FreightTerms

เงื่อนไขการขนส่ง เช่น null

FOB

เงื่อนไขการส่งมอบสินค้า เช่น null

NoteToReceiver

ข้อความถึงผู้รับ เช่น "This is a note to Receiver"

NoteToSupplier

ข้อความถึงผู้จำหน่าย เช่น "This is a note to Supplier"

Carrier

ชื่อผู้ขนส่ง เช่น null

DefaultTaxationCountryCode

รหัสประเทศที่ใช้จัดเก็บภาษี เช่น "TH"

DefaultTaxationCountry

ชื่อประเทศที่ใช้จัดเก็บภาษี เช่น "Thailand"

LineNumber

หมายเลขรายการ เช่น 1

LineType

ประเภทของรายการ เช่น "Fixed Price Services"

Category

หมวดหมู่ เช่น "INV_001"

Description

รายละเอียดของรายการ เช่น "PO-Tst1"

Amount

จำนวนเงินในรายการ เช่น 1

ScheduleNumber

หมายเลข Schedule เช่น 1

Amount

จำนวนเงินใน Schedule เช่น 100

ShipToLocation

สถานที่จัดส่ง เช่น "กองกฎหมาย ชั้น 4 อาคารสิริคุณากร"

ShipToOrganization

องค์กรที่จัดส่ง เช่น "INV01-สำนักงานอธิการบดี"

ReceiptCloseTolerancePercent

เปอร์เซ็นต์การปิดรับสินค้า เช่น 0

InvoiceMatchOptionCode

โค้ดตัวเลือกการจับคู่ใบแจ้งหนี้ เช่น "P"

InvoiceMatchOption

ตัวเลือกการจับคู่ใบแจ้งหนี้ เช่น "Order"

InspectionRequiredFlag

ต้องการการตรวจสอบหรือไม่ เช่น false

ReceiptRequiredFlag

ต้องการการรับสินค้าอย่างเป็นทางการหรือไม่ เช่น false

MatchApprovalLevelCode

ระดับการอนุมัติการจับคู่ เช่น "2-Way"

MatchApprovalLevel

ชื่อระดับการอนุมัติ เช่น "2 Way"

EarlyReceiptToleranceDays

จำนวนวันที่สามารถรับสินค้าได้ก่อนกำหนด เช่น 0

InvoiceCloseTolerancePercent

เปอร์เซ็นต์การปิดใบแจ้งหนี้ เช่น 0

LateReceiptToleranceDays

จำนวนวันที่รับสินค้าช้ากว่ากำหนด เช่น 0

ReceiptRouting

เส้นทางการรับสินค้า เช่น "Direct delivery"

DestinationTypeCode

รหัสประเภทปลายทาง เช่น "EXPENSE"

Carrier

ผู้ขนส่ง เช่น null

DistributionNumber

หมายเลข Distribution เช่น 1

DeliverToLocation

สถานที่จัดส่ง เช่น "กองกฎหมาย ชั้น 4 อาคารสิริคุณากร"

POChargeAccountId

หมายเลขบัญชีค่าใช้จ่าย เช่น 300000048117268

Amount

จำนวนเงิน เช่น 1

 

1.5.2.                   Parameter สำหรับสร้าง Approve PO

 

ชื่อ Parameter

คำอธิบาย

name

ชื่อของคำสั่งที่ใช้ เช่น "submit"

parameters

รายการของพารามิเตอร์เพิ่มเติม

bypassApprovalsFlag

ใช้สำหรับข้ามขั้นตอนการอนุมัติหรือไม่ เช่น "true"

 


1.5.3.                   Parameter สำหรับสร้าง Invoice

ชื่อ Parameter

คำอธิบาย

InvoiceNumber

หมายเลขใบแจ้งหนี้ เช่น "ap_inv_004"

InvoiceCurrency

สกุลเงินของใบแจ้งหนี้ เช่น "THB"

InvoiceAmount

จำนวนเงินในใบแจ้งหนี้ เช่น 1

InvoiceDate

วันที่ออกใบแจ้งหนี้ เช่น "2025-01-20"

BusinessUnit

หน่วยงานธุรกิจ เช่น "KKBU01-สำนักงานอธิการบดี"

Supplier

ชื่อผู้จำหน่าย เช่น "หจก. เอ็ม แอนด์ จี ซิสเต็ม"

SupplierSite

ชื่อสถานที่ของผู้จำหน่าย เช่น "HQ"

Description

รายละเอียดใบแจ้งหนี้ เช่น "Office Supplies"

TermsDate

วันที่เงื่อนไข เช่น "2025-01-20"

PurchaseOrderNumber

หมายเลขใบสั่งซื้อ เช่น "PUR-68000204"

LineNumber

หมายเลขบรรทัด เช่น "1"

LineType

ประเภทของบรรทัด เช่น "Item"

LineAmount

จำนวนเงินในบรรทัด เช่น "1"

PurchaseOrderNumber

หมายเลขใบสั่งซื้อ เช่น "PUR-68000204"

PurchaseOrderLineNumber

หมายเลขบรรทัดในใบสั่งซื้อ เช่น "1"

PurchaseOrderScheduleLineNumber

หมายเลขกำหนดการในใบสั่งซื้อ เช่น "1"

 


 


    • Related Articles

    • [ADMIN] คู่มือการเชื่อมต่อระบบบริหารทุนวิจัย

      1. ระบบบริหารทุนวิจัย (Research fund) และ ระบบ Oracle ERP 1.1. ระบบบริหารทุนวิจัย (Research fund): การออกแบบโครงสร้างการเชื่อมต่อข้อมูลกับระบบ (Architecture Diagram) รูปที่ 6 ระบบบริหารทุนวิจัย (Research fund): ...
    • [ADMIN] คู่มือการเชื่อมต่อระบบยืนยันตัวตนด้วยวิธีการทางอิเล็กทรอนิกส์ KKUID HUB

      1. ระบบยืนยันตัวตนด้วยวิธีการทางอิเล็กทรอนิกส์ (KKUID HUB) และระบบบริหารจัดการทรัพยากรบุคคล (Human Capital Management: HCM) 1.1. ระบบยืนยันตัวตนด้วยวิธีการทางอิเล็กทรอนิกส์ (KKUID HUB) และระบบบริหารจัดการทรัพยากรบุคคล (Human Capital Management: HCM) ...
    • [FIN] กระบวนการสร้างสัญญาเงินยืม ในระบบจัดการเงินยืม

      1.1. LMS.P2 กระบวนการสร้างสัญญายืมเงิน (สร้างสัญญาเงินยืม) ในระบบจัดการเงินยืม สัญญาเงินยืม จะแบ่งขั้นตอนหลักๆ ออกเป็น 2 ขั้นตอน คือ o ขั้นตอนที่ 1 มหาวิทยาลัยทำการจ่ายเงินยืมให้แก่ผู้ขอยืม o ขั้นตอนที่ 2 ผู้ขอยืม ชำระคืนเงินยืม ด้วย o เงินสด o หรือ ...
    • [ADMIN] คู่มือการเชื่อมต่อระบบลงเวลาปฏิบัติงาน Appsheet

      ระบบลงเวลาปฏิบัติงาน (Appsheet) และระบบบริหารจัดการทรัพยากรบุคคล (Human Capital Management: HCM) 1. ระบบลงเวลาปฏิบัติงาน (Appsheet) และระบบบริหารจัดการทรัพยากรบุคคล (Human Capital Management: HCM) การออกแบบโครงสร้างการเชื่อมต่อข้อมูลกับระบบ ...
    • [ADMIN] การสร้างรายงานและแสดงผล

      1. การสร้างรายงานและแสดงผล การสร้างรายงานบนระบบ Oracle Fusion Cloud ผู้ดูแลระบบสามารถสร้างได้ด้วยตนเอง โดยเรียกการสร้างรายงานวิธีนี้ว่า Oracle Transactional Business Intelligence (OTBI) สามารถสร้างรายงานไว้สำหรับตนเองหรือเผยแพร่ให้กับผู้ใช้อื่นๆ ...