Renamed Unit to UnitOfMeasure to not interfere with Kotlin's Unit type

This commit is contained in:
dankito 2024-12-13 05:52:41 +01:00
parent 31b021bae7
commit a69b4ed4d3
3 changed files with 4 additions and 3 deletions

View File

@ -1,11 +1,12 @@
package net.codinux.invoicing.model
import net.codinux.invoicing.model.codes.UnitOfMeasure
import java.math.BigDecimal
class InvoiceItem(
val name: String,
val quantity: BigDecimal,
val unit: String,
val unit: UnitOfMeasure,
val unitPrice: BigDecimal,
val vatRate: BigDecimal,
val articleNumber: String? = null,

View File

@ -1,6 +1,6 @@
package net.codinux.invoicing.model.codes
enum class Unit(val code: String, val englishName: String, val symbol: String?, val isFrequentlyUsedValue: Boolean) {
enum class UnitOfMeasure(val code: String, val englishName: String, val symbol: String?, val isFrequentlyUsedValue: Boolean) {
_10("10", "group", null, false),
_11("11", "outfit", null, false),
_13("13", "ration", null, false),

View File

@ -16,7 +16,7 @@ enum class CodeListType(val className: String, val usesFullList: Boolean, val us
UN_7143_ItemTypeIdentificationCode("ItemTypeIdentificationCode", true, listOf("BT-158-1")), // tab Item
UN_7161_SpecialServiceDescriptionCodes("ChargeReasonCode", true, listOf("BT-105", "BT-145")), // tab Charge
Units("Unit", true, listOf("BT-130", "BT-150")), // UN/ECE Recommendation N°20 and UN/ECE Recommendation N°21 — Unit codes
Units("UnitOfMeasure", true, listOf("BT-130", "BT-150")), // UN/ECE Recommendation N°20 and UN/ECE Recommendation N°21 — Unit codes
EAS("ElectronicAddressSchemeIdentifier", true, listOf("BT-34-1", "BT-49-1")),
VATEX("VatExemptionReasonCode", true, listOf("BT-121")),