rowsPanel.setButtonsEnabled(enabled);
}
public void loadDataCompleted(boolean error,PurchaseDocPK pk) {
DetailPurchaseDocVO vo = (DetailPurchaseDocVO)headerFormPanel.getVOModel().getValueObject();
this.setTitle(ClientSettings.getInstance().getResources().getResource("debiting note")+(vo.getDocSequenceDOC06()!=null?" - "+vo.getDocYearDOC06()+"/"+vo.getDocSequenceDOC06():"")+" - "+vo.getName_1REG04()+" "+(vo.getName_2REG04()==null?"":vo.getName_2REG04()));
purchaseTotalsPanel1.getControlTaxableIncome().setDecimals(vo.getDecimalsREG03().intValue());
purchaseTotalsPanel1.getControlTaxableIncome().setCurrencySymbol(vo.getCurrencySymbolREG03());
purchaseTotalsPanel1.getControlTaxableIncome().setDecimalSymbol(vo.getDecimalSymbolREG03().charAt(0));
purchaseTotalsPanel1.getControlTaxableIncome().setGroupingSymbol(vo.getThousandSymbolREG03().charAt(0));
purchaseTotalsPanel1.getControlTotal().setDecimals(vo.getDecimalsREG03().intValue());
purchaseTotalsPanel1.getControlTotal().setCurrencySymbol(vo.getCurrencySymbolREG03());
purchaseTotalsPanel1.getControlTotal().setDecimalSymbol(vo.getDecimalSymbolREG03().charAt(0));
purchaseTotalsPanel1.getControlTotal().setGroupingSymbol(vo.getThousandSymbolREG03().charAt(0));
purchaseTotalsPanel1.getControlTotalVat().setDecimals(vo.getDecimalsREG03().intValue());
purchaseTotalsPanel1.getControlTotalVat().setCurrencySymbol(vo.getCurrencySymbolREG03());
purchaseTotalsPanel1.getControlTotalVat().setDecimalSymbol(vo.getDecimalSymbolREG03().charAt(0));
purchaseTotalsPanel1.getControlTotalVat().setGroupingSymbol(vo.getThousandSymbolREG03().charAt(0));
rowsPanel.setParentVO(vo);
rowsPanel.getGrid().getOtherGridParams().put(ApplicationConsts.PURCHASE_DOC_PK,pk);
rowsPanel.getGrid().reloadData();
if (vo.getDocStateDOC06().equals(ApplicationConsts.CONFIRMED) ||
vo.getDocStateDOC06().equals(ApplicationConsts.CLOSED)) {
confirmButton.setEnabled(false);
setButtonsEnabled(false);
rowsPanel.setButtonsEnabled(false);
}
if (!vo.getDocStateDOC06().equals(ApplicationConsts.HEADER_BLOCKED)) {
confirmButton.setEnabled(false);
}
if (vo.getDocStateDOC06().equals(ApplicationConsts.HEADER_BLOCKED)) {
confirmButton.setEnabled(true);
}
if (vo.getDocStateDOC06().equals(ApplicationConsts.CONFIRMED) ||
vo.getDocStateDOC06().equals(ApplicationConsts.CLOSED) ||
vo.getDocStateDOC06().equals(ApplicationConsts.HEADER_BLOCKED)) {
printButton.setEnabled(true);
}
else {
printButton.setEnabled(false);
}