Package org.openinvoice.ubl4j.util

Examples of org.openinvoice.ubl4j.util.WorkTimeUnit


    public void setPriceType(PriceType priceType) {
        this.priceType = priceType;
    }

    public void convert(WorkTimeUnit targetWorkTimeUnit, BigDecimal numberOfHoursInDay) {
        WorkTimeUnit existingTimeUnit = WorkTimeUnit.createInstance(invoicedQuantityType.getUnitCode(),
                numberOfHoursInDay);
        if (existingTimeUnit.equals(targetWorkTimeUnit)) {
            return;
        } else if (existingTimeUnit.equals(WorkTimeUnit.DAYS)) {
            convertFromDaysToHours(numberOfHoursInDay);
        } else if (existingTimeUnit.equals(WorkTimeUnit.HOURS)) {
            convertFromHoursToDays(numberOfHoursInDay);
        } else {
            throw new IllegalArgumentException("WorkTimeUnit is not supported");
        }
    }
View Full Code Here

TOP

Related Classes of org.openinvoice.ubl4j.util.WorkTimeUnit

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.