fixed Reportingstruktur angleichen #25
This commit is contained in:
parent
0028ab8977
commit
01125fc875
7 changed files with 27 additions and 12 deletions
|
|
@ -73,6 +73,7 @@ export default {
|
|||
<style scoped>
|
||||
.route-container {
|
||||
padding: 20px;
|
||||
min-height: 20rem;
|
||||
}
|
||||
|
||||
.route {
|
||||
|
|
|
|||
|
|
@ -176,10 +176,10 @@ export default {
|
|||
return (this.hu.width && this.hu.length && this.hu.height && this.hu.weight && this.hu.content_unit_count)
|
||||
},
|
||||
showPrice() {
|
||||
return (this.premise.material_cost)
|
||||
return !(this.premise.material_cost === null) || (this.premise.material_cost === 0)
|
||||
},
|
||||
showPriceIncomplete() {
|
||||
return !(this.premise.oversea_share)
|
||||
return (this.premise.oversea_share === null)
|
||||
},
|
||||
isSelected() {
|
||||
return this.premise.selected;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="report-container">
|
||||
<div class="box-gap">
|
||||
<div class="report-header">{{ report.supplier.name }}</div></div>
|
||||
<div class="report-header">{{ shorten(report.supplier.name, 35) }}</div></div>
|
||||
<div class="report-chart">
|
||||
<report-chart
|
||||
title=""
|
||||
|
|
@ -180,7 +180,7 @@
|
|||
</div>
|
||||
|
||||
<div class="report-content-row">
|
||||
<div>Safety stock [days]</div>
|
||||
<div>Safety stock [w-days]</div>
|
||||
<div class="report-content-data-cell">{{ premise.safety_stock }}</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -206,12 +206,12 @@
|
|||
</div>
|
||||
|
||||
<div class="report-content-row">
|
||||
<div>Mixable HU</div>
|
||||
<div class="report-content-data-cell">{{ premise.mixed ? 'yes' : 'no' }} </div>
|
||||
<div>Mixed container</div>
|
||||
<div class="report-content-data-cell">{{ premise.mixed ? 'Yes' : 'No' }} </div>
|
||||
</div>
|
||||
|
||||
<div class="report-content-row">
|
||||
<div>Stacking factor</div>
|
||||
<div>Stacked layers</div>
|
||||
<div class="report-content-data-cell">{{ premise.layer }} </div>
|
||||
</div>
|
||||
|
||||
|
|
@ -227,7 +227,7 @@
|
|||
|
||||
<div class="report-content-row">
|
||||
<div>Limiting factor</div>
|
||||
<div class="report-content-data-cell">{{ premise.weight_exceeded ? 'weight' : 'volume' }} </div>
|
||||
<div class="report-content-data-cell">{{ premise.weight_exceeded ? 'Weight' : 'Volume' }} </div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
@ -261,6 +261,13 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
shorten(text, length) {
|
||||
if(text !== null && text !== undefined && text.length > length) {
|
||||
return `${text.substring(0, length - 3)} …` ;
|
||||
}
|
||||
|
||||
return text;
|
||||
},
|
||||
getContainerTypeName(text) {
|
||||
switch (text) {
|
||||
case 'FEU':
|
||||
|
|
@ -274,7 +281,7 @@ export default {
|
|||
},
|
||||
toFixedDimension(value, unit) {
|
||||
if(unit === 'm') {
|
||||
return value.toFixed(4);
|
||||
return value.toFixed(2);
|
||||
} else if(unit === 'cm') {
|
||||
return value.toFixed(2);
|
||||
} else if(unit === 'mm') {
|
||||
|
|
|
|||
|
|
@ -56,7 +56,8 @@ export const usePropertySetsStore = defineStore('propertySets', {
|
|||
async loadPeriods() {
|
||||
this.loading = true;
|
||||
const url = `${config.backendUrl}/properties/periods`;
|
||||
this.periods = await performRequest(this, 'GET', url, null);
|
||||
const data = await performRequest(this, 'GET', url, null);
|
||||
this.periods = data.data;
|
||||
this.selectedPeriod = this.getCurrentPeriodId;
|
||||
this.loading = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,8 @@ export const useValidityPeriodStore = defineStore('validityPeriod', {
|
|||
async loadPeriods() {
|
||||
this.loading = true;
|
||||
const url = `${config.backendUrl}/rates/periods`;
|
||||
this.periods = await performRequest(this,'GET', url, null);
|
||||
const data = await performRequest(this,'GET', url, null);
|
||||
this.periods = data.data;
|
||||
this.selectedPeriod = this.getCurrentPeriodId;
|
||||
this.loading = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -215,6 +215,11 @@ public class PreCalculationCheckService {
|
|||
throw new PremiseValidationError("HU dimensions too large. Review entered length, width, height and selected dimension unit [mm, cm, m].");
|
||||
}
|
||||
|
||||
|
||||
if((hu.getLength() * hu.getWidth()) < 20000) {
|
||||
throw new PremiseValidationError("HU dimensions too small. Review entered length, width, height and selected dimension unit [mm, cm, m].");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void materialCheck(Premise premise) {
|
||||
|
|
|
|||
|
|
@ -296,7 +296,7 @@ public class ReportTransformer {
|
|||
var disposalValues = annualAmount.compareTo(BigDecimal.ZERO) == 0 ? BigDecimal.ZERO : destination.stream().map(CalculationJobDestination::getAnnualDisposalCost).reduce(BigDecimal.ZERO, BigDecimal::add).divide(annualAmount, 4, RoundingMode.HALF_UP);
|
||||
var customValues = annualAmount.compareTo(BigDecimal.ZERO) == 0 ? BigDecimal.ZERO : destination.stream().map(CalculationJobDestination::getAnnualCustomCost).reduce(BigDecimal.ZERO, BigDecimal::add).divide(annualAmount, 4, RoundingMode.HALF_UP);
|
||||
|
||||
var noTransportSplit = weightedTotalCost.totalPreRunCost.compareTo(BigDecimal.ZERO) == 0 && weightedTotalCost.totalMainRunCost.compareTo(BigDecimal.ZERO) == 0 && weightedTotalCost.totalPostRunCost.compareTo(BigDecimal.ZERO) == 0;
|
||||
var noTransportSplit = true; //= weightedTotalCost.totalPreRunCost.compareTo(BigDecimal.ZERO) == 0 && weightedTotalCost.totalMainRunCost.compareTo(BigDecimal.ZERO) == 0 && weightedTotalCost.totalPostRunCost.compareTo(BigDecimal.ZERO) == 0;
|
||||
|
||||
|
||||
var preRunValues = weightedTotalCost.totalPreRunCost.divide(annualAmount, 4, RoundingMode.HALF_UP);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue