供應商應付憑據回應

本指南將說明 UBL 2.4 申請回應的應用方式 並且符合 UBL 2.4 標準。其主要功能就是將 向稅務機關提交的帳單文件狀態。分派的 稅務機關與 Google 合作的稅務機關, 提交狀態,並可能於 都屬於稅務機關的

結構定義有助於供應商報告結果,將文件提交到 Google,涵蓋:

  • 文件接受狀態。
  • 稅務機關發現的問題或錯誤。
  • 相關二進位檔案連結,以便取得月結單或貸項憑單。

這種結構化的通訊協定可確保 Google、廠商和稅務機關都在提升應付憑據效率 確保資料處理與法規遵循情形

與用於要求的批次處理機制類似 方法,將多份文件整合成單一提交, 有效管理如需這項機制的詳細分析,請參閱 月結單回應批次處理 專區。

結構定義以圖像化的結構描述了文件的 強調在 AI 方面 應付憑據提交報表:

這張圖表說明電子月結單回應結構定義的結構

1.0 應用程式回應標頭

重要中繼資料,例如 Google 供應商要求 ID,以及日期與 發出回應的時間 (以世界標準時間為準)。

元素 說明 範例
cbc:UUID 應付憑據要求中提供的 Google 供應商申請 ID。 123e4567-e89b-12d3-a456-426614174000
cbc:IssueDate 發出回覆的日期。 2023-06-02
cbc:IssueTime 發出回應的時間 (世界標準時間)。 08:20:00-08:00

範例

<ApplicationResponse>
  <cbc:UUID>123e4567-e89b-12d3-a456-426614174000</cbc:UUID>
  <cbc:IssueDate>2023-06-02</cbc:IssueDate>
  <cbc:IssueTime>08:20:00-08:00</cbc:IssueTime>
  <cac:SenderParty>
    <!-- Sender party details -->
  </cac:SenderParty>
  <cac:ReceiverParty>
    <!-- Receiver party details -->
  </cac:ReceiverParty>
  <cac:DocumentResponse>
    <!-- Document Response content -->
  </cac:DocumentResponse>
</ApplicationResponse>

2.0 傳送者和接收者資訊

本節會提供 應用程式回應,根據 UBL 標準,此為必填欄位。在本 背景資料,則寄件者應為轉寄回應的廠商 和接收者應為 Google

元素 說明 範例
cac:SenderParty/cac:PartyName/cbc:Name 由政府系統轉交回覆的廠商名稱。 Vendor Company
cac:ReceiverParty/cac:PartyName/cbc:Name 接收回應的實體名稱。 Google

範例

<ApplicationResponse>
  ...
  <cac:SenderParty>
    <cac:PartyName>
      <cbc:Name>Vendor Company</cbc:Name>
    </cac:PartyName>
  </cac:SenderParty>

  <cac:ReceiverParty>
    <cac:PartyName>
      <cbc:Name>Google</cbc:Name>
    </cac:PartyName>
  </cac:ReceiverParty>
  ...
</ApplicationResponse>

3.0 文件回應

本節提供文件回應的詳細資料,同時 回應的狀態,以及此結果產生的任何相關文件參照 。

元素 說明 範例
cac:Response 必要欄位。內含與提交應付憑據相關的回應狀態。 請參閱第 3.1 節
cac:DocumentReference 選用設定。可以包含零個或多個產生的文件參照。 請參閱第 3.2 節

範例

<ApplicationResponse>
  ...
  <cac:DocumentResponse>
    <cac:Response>
      <!-- Response details -->
    </cac:Response>
    <cac:DocumentReference>
      <!-- Document Reference (if applicable) -->
    </cac:DocumentReference>
    <cac:DocumentReference>
      <!-- Document Reference (if applicable) -->
    </cac:DocumentReference>
  </cac:DocumentResponse>
</ApplicationResponse>

3.1 回應

每項應用程式回應都應包含單一 cac:Response,詳細說明 與提交的文件相關聯這可以確保 各項文件處理結果都會清楚傳達

元素 說明 範例
cbc:ReferenceID 稅務系統針對所參照發票傳回的專屬 ID。 BIL-123456
cbc:ReferenceID/@schemeID 用來說明來源的系統或標準。 KSEF
cac:Status/cbc:StatusReasonCode 根據預先定義的值定義回應或狀態原因的程式碼:list NON
cac:Status/cbc:StatusReason 提供更多有關狀態碼的說明文字。 No Issue

範例

<ApplicationResponse>
  ...
  <cac:DocumentResponse>
    <cac:Response>
      <cbc:ReferenceID schemeID="Vendor Company">BIL-123456</cbc:ReferenceID>
      <cac:Status>
        <cbc:StatusReasonCode>NON</cbc:StatusReasonCode>
        <cbc:StatusReason>No Issue</cbc:StatusReason>
      </cac:Status>
    </cac:Response>
    <cac:DocumentReference>
      <!-- Document Reference (if applicable) -->
    </cac:DocumentReference>
    <cac:DocumentReference>
      <!-- Document Reference (if applicable) -->
    </cac:DocumentReference>
  </cac:DocumentResponse>
</ApplicationResponse>

3.2 文件參考資料

本節可用來附加至模型的參考資料: 應付憑據提交程序是選用項目,可包含多個 參考資料。

元素 說明 範例
cbc:ID 當地應付憑據號碼 BIL-123456
cbc:ID/@schemeID 應付憑據參考核發機構的 ID Vendor Company
cbc:IssueDate 稅務機關發出這則回覆的日期 2023-06-02
cbc:DocumentTypeCode 參照的文件類型,以代碼表示 (若接受應付憑據) 380
cbc:DocumentType 參照的文件類型,以文字表示 Invoice
cac:Attachment/cac:ExternalReference/cbc:FormatCode 產生的月結單格式 (XML、PDF、網址) XML
cac:Attachment/cac:ExternalReference/cbc:FileName 所產生 SFTP 伺服器上檔案的檔案名稱 (適用於 XML 和 PDF 格式代碼) invoice_GCEMEAD0000000001.pdf
cac:Attachment/cac:ExternalReference/cbc:URI 用於擷取已產生檔案的網址 (適用於網址格式程式碼) https://example.com/invoice/view

以下範例說明如何在應用程式中參照文件 回應。第一個示例包含使用 SFTP 傳輸的文件,如 PDF 和 XML 格式,而第二個範例示範了 使用網址,可讓使用者直接存取檔案,無需傳輸檔案 通訊協定

範例 1:PDF 和使用安全檔案傳輸通訊協定轉移的 XML 應付憑據附件

<ApplicationResponse>
  <!-- Sender and Receiver Details -->
  <cac:DocumentResponse>
    <cac:Response>
      <!-- Response Details -->
    </cac:Response>
    <cac:DocumentReference>
      <cbc:ID schemeID="Vendor Company">BIL-123456</cbc:ID>
      <cbc:IssueDate>2023-06-02</cbc:IssueDate>
      <cbc:DocumentTypeCode>380</cbc:DocumentTypeCode>
      <cbc:DocumentType>Invoice</cbc:DocumentType>
      <cac:Attachment>
        <cac:ExternalReference>
          <!-- PDF Document stored on SFTP -->
          <cbc:FormatCode>PDF</cbc:FormatCode>
          <cbc:FileName>invoice_GCEMEAD0000000001.pdf</cbc:FileName>
        </cac:ExternalReference>
      </cac:Attachment>
      <cac:Attachment>
        <cac:ExternalReference>
          <!-- XML Document stored on SFTP -->
          <cbc:FormatCode>XML</cbc:FormatCode>
          <cbc:FileName>invoice_GCEMEAD0000000001.xml</cbc:FileName>
        </cac:ExternalReference>
      </cac:Attachment>
    </cac:DocumentReference>
  </cac:DocumentResponse>
</ApplicationResponse>

示例 2:透過網址存取文件

<ApplicationResponse>
  <!-- Sender and Receiver Details -->
  <cac:DocumentResponse>
    <cac:Response>
      <!-- Response Details -->
    </cac:Response>
    <cac:DocumentReference>
      <cbc:ID schemeID="Vendor Company">BIL-123456</cbc:ID>
      <cbc:IssueDate>2023-06-02</cbc:IssueDate>
      <cbc:DocumentTypeCode>380</cbc:DocumentTypeCode>
      <cbc:DocumentType>Invoice</cbc:DocumentType>
      <cac:Attachment>
        <cac:ExternalReference>
          <!-- Document accessible using URL -->
          <cbc:FormatCode>URL</cbc:FormatCode>
          <cbc:URI>https://example.com/invoice/view</cbc:URI>
        </cac:ExternalReference>
      </cac:Attachment>
    </cac:DocumentReference>
  </cac:DocumentResponse>
</ApplicationResponse>