Skip to content

Commit

Permalink
layout ordini e contratti
Browse files Browse the repository at this point in the history
  • Loading branch information
mspasiano committed Nov 20, 2017
1 parent 486d207 commit 2026385
Show file tree
Hide file tree
Showing 22 changed files with 300 additions and 447 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -24,7 +24,7 @@
<sonar.skip>true</sonar.skip>
<java.version>1.8</java.version>
<spring.version>4.3.3.RELEASE</spring.version>
<jada.version>5.0.43</jada.version>
<jada.version>5.0.45</jada.version>
<project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>
<sigla.build.number>${maven.build.timestamp}</sigla.build.number>
<slf4j.version>1.7.21</slf4j.version>
Expand Down
2 changes: 1 addition & 1 deletion sigla-ejb/pom.xml
Expand Up @@ -26,7 +26,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<configuration>
<ejbVersion>3.0</ejbVersion>
<ejbVersion>3.1</ejbVersion>
<archive>
<manifest>
<addClasspath>true</addClasspath>
Expand Down
Expand Up @@ -221,7 +221,7 @@ public Forward doRifiutaFattura(ActionContext context) throws FillException, Bus
fatturaPassivaElettronicaBP.setMessage("Ricevuta decorrenza termini - non è possibile effettuare il Rifiuto. Registrare il documento e richiedere nota credito, oppure rifiutare il documento secondo le modalità di invio PEC (Vedere Manuale)!");
} else {
String message = "Inserire il motivo di rifiuto della fattura:";
message += "<textarea maxLength=\"255\" name=\"main.motivoRifiuto\" class=\"FormInput\" "+
message += "<textarea maxLength=\"255\" name=\"main.motivoRifiuto\" class=\"FormInput w-100\" "+
"cols=\"60\" rows=\"5\" onfocus=\"focused(this)\" onclick=\"cancelBubble(event)\"></textarea>";
openConfirm( context, message, it.cnr.jada.util.action.OptionBP.CONFIRM_YES_NO, "doConfirmRifiutaFattura");
}
Expand Down
239 changes: 120 additions & 119 deletions sigla-ejb/src/main/java/it/cnr/contab/util/ImportoFormat.java
@@ -1,137 +1,138 @@
package it.cnr.contab.util;

/**
* Formattatore di importi
*/

public abstract class ImportoFormat extends java.text.Format implements it.cnr.jada.bulk.StyledFormat {

protected static final java.text.Format format = new java.text.DecimalFormat("#,##0.00");
private int precision = 0;
private int round = java.math.BigDecimal.ROUND_HALF_UP;

public ImportoFormat() {
super();
}
protected static final java.text.Format format = new java.text.DecimalFormat("#,##0.00");
private int precision = 0;
private int round = java.math.BigDecimal.ROUND_HALF_UP;

/**
* Effettua la formattazione
*/
public StringBuffer format(Object obj, StringBuffer toAppendTo, java.text.FieldPosition pos) {
if (obj != null) {
getFormat().format(obj,toAppendTo,pos);
String symbol = getSymbol();
if (symbol != null) {
toAppendTo.append(' ');
toAppendTo.append(symbol);
}
}
return toAppendTo;
}
public ImportoFormat() {
super();
}

/**
* <!-- @TODO: da completare -->
* Restituisce il valore della proprietà 'format'
*
* @return Il valore della proprietà 'format'
*/
public java.text.Format getFormat() {
return format;
}
/**
* Effettua la formattazione
*/
public StringBuffer format(Object obj, StringBuffer toAppendTo, java.text.FieldPosition pos) {
if (obj != null) {
getFormat().format(obj, toAppendTo, pos);
String symbol = getSymbol();
if (symbol != null) {
toAppendTo.append(' ');
toAppendTo.append(symbol);
}
}
return toAppendTo;
}

/**
* <!-- @TODO: da completare -->
* Restituisce il valore della proprietà 'precision'
*
* @return Il valore della proprietà 'precision'
*/
public int getPrecision() {
return precision;
}
/**
* <!-- @TODO: da completare -->
* Restituisce il valore della proprietà 'format'
*
* @return Il valore della proprietà 'format'
*/
public java.text.Format getFormat() {
return format;
}

/**
* <!-- @TODO: da completare -->
* Restituisce il valore della proprietà 'round'
*
* @return Il valore della proprietà 'round'
*/
public int getRound() {
return round;
}
/**
* <!-- @TODO: da completare -->
* Restituisce il valore della proprietà 'precision'
*
* @return Il valore della proprietà 'precision'
*/
public int getPrecision() {
return precision;
}

/**
* Restituisce "text-align: right"
*
* @return String
*/
public String getStyle(Object value) {
return "text-align: right";
}
/**
* <!-- @TODO: da completare -->
* Imposta il valore della proprietà 'precision'
*
* @param newPrecision Il valore da assegnare a 'precision'
*/
public void setPrecision(int newPrecision) {
precision = newPrecision;
}

/**
* <!-- @TODO: da completare -->
* Restituisce il valore della proprietà 'symbol'
*
* @return Il valore della proprietà 'symbol'
*/
public String getSymbol() {
return null;
}
/**
* <!-- @TODO: da completare -->
* Restituisce il valore della proprietà 'round'
*
* @return Il valore della proprietà 'round'
*/
public int getRound() {
return round;
}

/**
* Effettua le operazioni di parse
*/
public Object parseObject(String source, java.text.ParsePosition status) {
status.setIndex(source == null ? 1 : source.length());
if (source == null || source.equals("")) return null;
source = source.trim();
if (source.length() == 0) return null;
if (source.endsWith(String.valueOf(getSymbol()))) {
source = source.substring(0,source.length()-1);
source = source.trim();
}
Number number;
try {
number = (Number)getFormat().parseObject(source);
} catch(java.text.ParseException pe) {
status.setIndex(0);
return null;
} catch(java.lang.NumberFormatException pe) {
status.setIndex(0);
return null;
/**
* <!-- @TODO: da completare -->
* Imposta il valore della proprietà 'round'
*
* @param newRound Il valore da assegnare a 'round'
*/
public void setRound(int newRound) {
round = newRound;
}
if(number == null) return null;
java.math.BigDecimal bd;
if (number instanceof java.math.BigDecimal)
bd = (java.math.BigDecimal)number;
else if (number instanceof java.math.BigInteger)
bd = new java.math.BigDecimal((java.math.BigInteger)number);
else if (number instanceof Long)
bd = java.math.BigDecimal.valueOf(number.longValue());
else
bd = new java.math.BigDecimal(number.doubleValue());
//if (bd.signum() < 0)
//status.setIndex(0);
bd = bd.setScale(getPrecision(),getRound());
return bd;
}

/**
* <!-- @TODO: da completare -->
* Imposta il valore della proprietà 'precision'
*
* @param newPrecision Il valore da assegnare a 'precision'
*/
public void setPrecision(int newPrecision) {
precision = newPrecision;
}
/**
* Restituisce "text-align: right"
*
* @return String
*/
public String getStyle(Object value) {
return "text-align: right";
}

/**
* <!-- @TODO: da completare -->
* Imposta il valore della proprietà 'round'
*
* @param newRound Il valore da assegnare a 'round'
*/
public void setRound(int newRound) {
round = newRound;
}
/**
* <!-- @TODO: da completare -->
* Restituisce il valore della proprietà 'symbol'
*
* @return Il valore della proprietà 'symbol'
*/
public String getSymbol() {
return null;
}

/**
* Effettua le operazioni di parse
*/
public Object parseObject(String source, java.text.ParsePosition status) {
status.setIndex(source == null ? 1 : source.length());
if (source == null || source.equals("")) return null;
source = source.trim();
if (source.length() == 0) return null;
if (source.endsWith(String.valueOf(getSymbol()))) {
source = source.substring(0, source.length() - 1);
source = source.trim();
}
Number number;
try {
number = (Number) getFormat().parseObject(source);
} catch (java.text.ParseException pe) {
status.setIndex(0);
return null;
} catch (java.lang.NumberFormatException pe) {
status.setIndex(0);
return null;
}
if (number == null) return null;
java.math.BigDecimal bd;
if (number instanceof java.math.BigDecimal)
bd = (java.math.BigDecimal) number;
else if (number instanceof java.math.BigInteger)
bd = new java.math.BigDecimal((java.math.BigInteger) number);
else if (number instanceof Long)
bd = java.math.BigDecimal.valueOf(number.longValue());
else
bd = new java.math.BigDecimal(number.doubleValue());
//if (bd.signum() < 0)
//status.setIndex(0);
bd = bd.setScale(getPrecision(), getRound());
return bd;
}
}
Expand Up @@ -631,26 +631,16 @@
label="CIG comunicato dal Committente da esporre sulla Fattura Attiva" />
<form name="searchtool">
<formFieldProperty
name="esercizio" />
name="esercizio"
inputCssClass="w-8" />
<formFieldProperty
name="pg_contratto" />
name="pg_contratto"
inputCssClass="w-8" />
<formFieldProperty
name="oggetto"
inputType="TEXT"
inputSize="40" />
</form>
<form name="bs_searchtool">
<formFieldProperty
name="esercizio"
style="width: 8%!important;"/>
<formFieldProperty
name="pg_contratto"
style="width: 8%!important;"/>
<formFieldProperty
name="oggetto"
inputType="TEXT"
inputSize="40" />
</form>
</form>
<form name="searchtool_large">
<formFieldProperty
name="esercizio" />
Expand Down
Expand Up @@ -375,15 +375,6 @@
label="Contratto"
CRUDBusinessProcessName="CRUDConfigAnagContrattoBP"
enabledOnSearch="true"
/>
<fieldProperty
name="bs_find_contratto"
property="contratto"
inputType="SEARCHTOOL"
formName="bs_searchtool"
label="Contratto"
CRUDBusinessProcessName="CRUDConfigAnagContrattoBP"
enabledOnSearch="true"
/>
<fieldProperty
name="esercizio_contratto"
Expand Down Expand Up @@ -601,10 +592,7 @@
/>
<formFieldProperty
name="find_contratto"
/>
<formFieldProperty
name="bs_find_contratto"
/>
/>
<formFieldProperty
name="esercizio_contratto"
/>
Expand Down
Expand Up @@ -99,15 +99,6 @@
CRUDBusinessProcessName="CRUDConfigAnagContrattoBP"
enabledOnSearch="true"
enabledOnView="true"
/>
<fieldProperty
name="bs_find_contratto_eov"
property="contratto"
inputType="SEARCHTOOL"
formName="bs_searchtool"
label="Contratto"
enabledOnSearch="true"
enabledOnView="true"
/>
<fieldProperty
name="esercizio_contratto_eov"
Expand Down Expand Up @@ -244,10 +235,7 @@
/>
<formFieldProperty
name="find_contratto_eov"
/>
<formFieldProperty
name="bs_find_contratto_eov"
/>
/>
<formFieldProperty
name="esercizio_contratto_eov"
/>
Expand Down

0 comments on commit 2026385

Please sign in to comment.