opencost-de / opencost

openCost data formats, documentation and examples
GNU General Public License v3.0
4 stars 0 forks source link

"Currency" #8

Closed bschweighofer closed 1 year ago

bschweighofer commented 1 year ago

Shouldn't "currency" appear twice? Once for "amount_invoice" and second for "amount_paid"? Also, wouldn't "currency" be non-required, if "amount_invoice" is also not required?

ReportBy: email

aw-bib commented 1 year ago

This should be clearified in our written documentation.

The XML / XSD specifies the currency as an attribute to amount_invoice:

 <opencost:amount_invoice currency="GBP">1234.56</opencost:amount_invoice>

(here: GBP). Furthermore the individual items of said invoice again feature currency attributes like

     <opencost:amounts_paid>
        <opencost:amount_paid currency="EUR" type="apc">1500.00</opencost:amount_paid>
        <opencost:amount_paid currency="EUR" type="vat">14.25</opencost:amount_paid>
      </opencost:amounts_paid>
cbroschinski commented 1 year ago

currency is indeed a mandatory attribute for all amount_invoice and amount_paid elements. The XML Schema already enforces this, the description has been updated to make this more clear.