public void loadDataCompleted(boolean error, SaleDocPK pk) { DetailSaleDocVO vo = (DetailSaleDocVO) headerFormPanel.getVOModel().getValueObject(); this.setTitle( ClientSettings.getInstance().getResources().getResource("credit note") + (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)); rowsPanel.setParentVO(vo); rowsPanel.getGrid().getOtherGridParams().put(ApplicationConsts.SALE_DOC_PK, pk); rowsPanel.getGrid().reloadData(); discPanel.setParentVO(vo); discPanel.getGrid().getOtherGridParams().put(ApplicationConsts.SALE_DOC_PK, pk); discPanel.getGrid().reloadData(); chargePanel.setParentVO(vo); chargePanel.getGrid().getOtherGridParams().put(ApplicationConsts.SALE_DOC_PK, pk); chargePanel.getGrid().reloadData(); actPanel.setParentVO(vo); actPanel.getGrid().getOtherGridParams().put(ApplicationConsts.SALE_DOC_PK, pk); actPanel.getGrid().reloadData(); if (vo.getDocStateDOC01().equals(ApplicationConsts.CONFIRMED) || 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); } }
public void setButtonsEnabled(boolean enabled) { rowsPanel.setButtonsEnabled(enabled); discPanel.setEnabled(enabled); chargePanel.setEnabled(enabled); actPanel.setEnabled(enabled); }