Representing Quantity, Duration, and Rate in InvoiceLine

In UBL 2.1, I need to create an invoice where the InvoiceLine amount is based on Quantity, Duration, and Rate. Specifically, a customer is hiring 2 generators for 7 days at a rate of SAR 250 per day.

How should I represent the duration (7 days) in the invoice?

  1. Is it appropriate to use the **BaseQuantity** element to represent the duration in days?
  2. If not, what is the best practice for accurately representing and calculating the invoice amount based on duration?

Example of the scenario:

  • Quantity of generators: 2
  • Duration of hire: 7 days
  • Rate per day: SAR 250

Total Amount=Quantity×Duration×Rate
Amount=2 × 7 × 250 = SAR3500

XML is attached for 1 PC Quantity, 31 Days and Rate 66.67

<cac:InvoiceLine>
		<cbc:ID>421823</cbc:ID>
		<cbc:Note>Equipment No. L0019 FOR 31 Day(s)  Unit Price SAR 66.67</cbc:Note>
		<cbc:InvoicedQuantity unitCode="PC">1.00</cbc:InvoicedQuantity>
		<cbc:LineExtensionAmount currencyID="SAR">2000.00</cbc:LineExtensionAmount>
		<cac:InvoicePeriod>
			<cbc:StartDate>2024-07-01</cbc:StartDate>
			<cbc:EndDate>2024-07-31</cbc:EndDate>
		</cac:InvoicePeriod>
		<cac:OrderLineReference>
			<cbc:LineID>K03788</cbc:LineID>
		</cac:OrderLineReference>
		<cac:AllowanceCharge>
			<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
			<cbc:AllowanceChargeReasonCode>95</cbc:AllowanceChargeReasonCode>
			<cbc:AllowanceChargeReason>Discount</cbc:AllowanceChargeReason>
			<cbc:Amount currencyID="SAR">66.77</cbc:Amount>
		</cac:AllowanceCharge>
		<cac:AllowanceCharge>
			<cbc:ChargeIndicator>true</cbc:ChargeIndicator>
			<cbc:AllowanceChargeReasonCode>DL</cbc:AllowanceChargeReasonCode>
			<cbc:AllowanceChargeReason>Charge</cbc:AllowanceChargeReason>
			<cbc:Amount currencyID="SAR">0.00</cbc:Amount>
		</cac:AllowanceCharge>
		<cac:TaxTotal>
			<cbc:TaxAmount currencyID="SAR">300.00</cbc:TaxAmount>
			<cbc:RoundingAmount currencyID="SAR">2300.00</cbc:RoundingAmount>
		</cac:TaxTotal>
		<cac:Item>
			<cbc:Name> قيمة إيجار معدة برج الإضاءة مع المولد:ل ي د 4  × 320 واط ، الصاري 8 م | Hire Charge of Lighting Tower with Genset: LED 4x320W, Mast 8m (L0019)</cbc:Name>
			<cac:SellersItemIdentification>
				<cbc:ID>L0019</cbc:ID>
			</cac:SellersItemIdentification>
			<cac:ClassifiedTaxCategory>
				<cbc:ID schemeID="UN/ECE 5305" schemeAgencyID="6">S</cbc:ID>
				<cbc:Percent>15.00</cbc:Percent>
				<cac:TaxScheme>
					<cbc:ID schemeID="UN/ECE 5153" schemeAgencyID="6">VAT</cbc:ID>
				</cac:TaxScheme>
			</cac:ClassifiedTaxCategory>
		</cac:Item>
		<cac:Price>
			<cbc:PriceAmount currencyID="SAR">66.67</cbc:PriceAmount>
			<cbc:BaseQuantity unitCode="Day">31</cbc:BaseQuantity>
			<cac:AllowanceCharge>
				<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
				<cbc:AllowanceChargeReasonCode>95</cbc:AllowanceChargeReasonCode>
				<cbc:AllowanceChargeReason>Discount</cbc:AllowanceChargeReason>
				<cbc:MultiplierFactorNumeric>0.00</cbc:MultiplierFactorNumeric>
				<cbc:Amount currencyID="SAR">0.00</cbc:Amount>
				<cbc:BaseAmount currencyID="SAR">66.67</cbc:BaseAmount>
			</cac:AllowanceCharge>
		</cac:Price>
	</cac:InvoiceLine>

Kindly advise if this method is correct @Ankit.K.Tiwari

Thanks

@Malik do you have any idea?