importazione scontrini carelli
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20251006091145 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
executeStatement("exec sp_rename 'ntb_docr.val_voucher', 'val_sco_st'");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
}
|
||||
}
|
||||
@@ -101,8 +101,8 @@ public class NtbDocr extends EntityBase {
|
||||
@SqlField(value = "causale_reso", maxLength = 5)
|
||||
private String causaleReso;
|
||||
|
||||
@SqlField(value = "val_voucher", nullable = false, defaultObjectValue = "0")
|
||||
private BigDecimal valVoucher;
|
||||
@SqlField(value = "val_sco_st", nullable = false, defaultObjectValue = "0")
|
||||
private BigDecimal valScoSt;
|
||||
|
||||
@EntityChild
|
||||
private List<NtbDocs> ntbDocs = new ArrayList<>();
|
||||
@@ -336,12 +336,12 @@ public class NtbDocr extends EntityBase {
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getValVoucher() {
|
||||
return valVoucher;
|
||||
public BigDecimal getValScoSt() {
|
||||
return valScoSt;
|
||||
}
|
||||
|
||||
public NtbDocr setValVoucher(BigDecimal valVoucher) {
|
||||
this.valVoucher = valVoucher;
|
||||
public NtbDocr setValScoSt(BigDecimal valScoSt) {
|
||||
this.valScoSt = valScoSt;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -283,11 +283,11 @@ rule "completeValScoArtNtbDocr"
|
||||
no-loop
|
||||
when
|
||||
eval(completeRulesEnabled)
|
||||
$entity: NtbDocr(( valVoucher == null || valVoucher == 0 ) && operation != OperationType.DELETE )
|
||||
$entity: NtbDocr(( valScoSt == null || valScoSt == 0 ) && operation != OperationType.DELETE )
|
||||
then
|
||||
BigDecimal valScoArt = ReceiptRules.calcValScoArt($entity);
|
||||
BigDecimal valSco = $entity.getValSco() != null ? $entity.getValSco() : BigDecimal.ZERO;
|
||||
modify ( $entity ) {
|
||||
setValVoucher(valSco.subtract(valScoArt))
|
||||
setValScoSt(valSco.subtract(valScoArt))
|
||||
}
|
||||
end
|
||||
Reference in New Issue
Block a user