confirmButton.setEnabled(false);
}
public void loadDataCompleted(boolean error,SaleDocPK pk) {
DetailSaleDocVO vo = (DetailSaleDocVO)headerFormPanel.getVOModel().getValueObject();
this.setTitle(ClientSettings.getInstance().getResources().getResource("desk selling")+(vo.getDocSequenceDOC01()!=null?" - "+vo.getDocYearDOC01()+"/"+vo.getDocSequenceDOC01():"")+" - "+vo.getName_1REG04()+" "+(vo.getName_2REG04()==null?"":vo.getName_2REG04()));
saleTotalsPanel1.getControlTaxableIncome().setDecimals(vo.getDecimalsREG03().intValue());
saleTotalsPanel1.getControlTaxableIncome().setCurrencySymbol(vo.getCurrencySymbolREG03());
saleTotalsPanel1.getControlTaxableIncome().setDecimalSymbol(vo.getDecimalSymbolREG03().charAt(0));
saleTotalsPanel1.getControlTaxableIncome().setGroupingSymbol(vo.getThousandSymbolREG03().charAt(0));
saleTotalsPanel1.getControlTotal().setDecimals(vo.getDecimalsREG03().intValue());
saleTotalsPanel1.getControlTotal().setCurrencySymbol(vo.getCurrencySymbolREG03());
saleTotalsPanel1.getControlTotal().setDecimalSymbol(vo.getDecimalSymbolREG03().charAt(0));
saleTotalsPanel1.getControlTotal().setGroupingSymbol(vo.getThousandSymbolREG03().charAt(0));
saleTotalsPanel1.getControlTotalVat().setDecimals(vo.getDecimalsREG03().intValue());
saleTotalsPanel1.getControlTotalVat().setCurrencySymbol(vo.getCurrencySymbolREG03());
saleTotalsPanel1.getControlTotalVat().setDecimalSymbol(vo.getDecimalSymbolREG03().charAt(0));
saleTotalsPanel1.getControlTotalVat().setGroupingSymbol(vo.getThousandSymbolREG03().charAt(0));
saleTotalsPanel1.getControlAllowance().setDecimals(vo.getDecimalsREG03().intValue());
saleTotalsPanel1.getControlAllowance().setCurrencySymbol(vo.getCurrencySymbolREG03());
saleTotalsPanel1.getControlAllowance().setDecimalSymbol(vo.getDecimalSymbolREG03().charAt(0));
saleTotalsPanel1.getControlAllowance().setGroupingSymbol(vo.getThousandSymbolREG03().charAt(0));
saleTotalsPanel1.getControlDeposit().setDecimals(vo.getDecimalsREG03().intValue());
saleTotalsPanel1.getControlDeposit().setCurrencySymbol(vo.getCurrencySymbolREG03());
saleTotalsPanel1.getControlDeposit().setDecimalSymbol(vo.getDecimalSymbolREG03().charAt(0));
saleTotalsPanel1.getControlDeposit().setGroupingSymbol(vo.getThousandSymbolREG03().charAt(0));
discPanel.getControlDiscValue().setDecimals(vo.getDecimalsREG03().intValue());
discPanel.getControlDiscValue().setCurrencySymbol(vo.getCurrencySymbolREG03());
discPanel.getControlDiscValue().setDecimalSymbol(vo.getDecimalSymbolREG03().charAt(0));
discPanel.getControlDiscValue().setGroupingSymbol(vo.getThousandSymbolREG03().charAt(0));
rowsPanel.setParentVO(vo);
rowsPanel.getGrid().getOtherGridParams().put(ApplicationConsts.SALE_DOC_PK,pk);
rowsPanel.getGrid().reloadData();
if (vo.getDocStateDOC01().equals(ApplicationConsts.CLOSED)) {
confirmButton.setEnabled(false);
setButtonsEnabled(false);
rowsPanel.setButtonsEnabled(false);
}
if (!vo.getDocStateDOC01().equals(ApplicationConsts.HEADER_BLOCKED)) {
confirmButton.setEnabled(false);
}
if (vo.getDocStateDOC01().equals(ApplicationConsts.HEADER_BLOCKED)) {
confirmButton.setEnabled(true);
}
if (vo.getDocStateDOC01().equals(ApplicationConsts.CONFIRMED) ||
vo.getDocStateDOC01().equals(ApplicationConsts.CLOSED) ||
vo.getDocStateDOC01().equals(ApplicationConsts.HEADER_BLOCKED)) {
printButton.setEnabled(true);
}
else {
printButton.setEnabled(false);
}