◆ FixedAssetWrapper()
org.turro.financials.assets.FixedAssetWrapper.FixedAssetWrapper |
( |
FixedAsset |
asset | ) |
|
◆ doDepreciations()
static void org.turro.financials.assets.FixedAssetWrapper.doDepreciations |
( |
Page |
page | ) |
|
|
static |
Definition at line 125 of file bsfinancials-www/src/main/java/org/turro/financials/assets/FixedAssetWrapper.java.
126 InputDialog.getInput(page, I_.get(
"Depreciations"),
"Date",
127 new Date(),
null, 0,
new Command() {
129 public Object execute(Context context) {
130 Date date = (Date) context.get(
"value");
132 for(RegisterView v : ViewWrapper.getViews()) {
133 RegisterGenerator rg =
new RegisterGenerator();
135 if(
asset.getView().getId() == v.getId()) {
137 if(!Zero.near(toDepreciate, 2)) {
138 Set<RegisterEntry> sre = rg.addAmount(v,
null,
asset.getStore(),
asset.getDepreciationLineType(),
139 asset.getId() +
"-" +
asset.getName(), toDepreciate);
140 for(RegisterEntry re : sre) {
141 re.setPath(FinancialsPU.getObjectPath(
asset));
146 if(rg.getRegister() !=
null && !(rg.getRegister().getRegisterEntries().isEmpty())) {
147 rg.getRegister().setView(v);
148 rg.getRegister().setRegisterDate(date);
149 FinancialsMenu.showRegister(rg.getRegister());
FixedAssetWrapper(FixedAsset asset)
static Collection< FixedAsset > getAssets()
◆ loadLines()
void org.turro.financials.assets.FixedAssetWrapper.loadLines |
( |
FilterGrid |
filterGrid, |
|
|
final Command |
command |
|
) |
| |
Definition at line 80 of file bsfinancials-www/src/main/java/org/turro/financials/assets/FixedAssetWrapper.java.
81 final DocumentLinesListbox docLines =
new DocumentLinesListbox(getPossibleLines(filterGrid));
82 docLines.setMultiple(
true);
83 docLines.setCheckmark(
true);
84 docLines.setShowContract(
true);
85 docLines.setSelectFirst(
false);
87 SelectionDialog.getComponent(
88 Framework.getCurrent().getPage(),
90 docLines,
"80%",
"80%",
new Command() {
92 public Object execute(Context context) {
93 if(docLines !=
null) {
94 for(DocumentLine dl : docLines.getObjectValues()) {
95 asset.getDocumentLines().add(dl);
97 if(command !=
null) command.execute(context);
◆ save()
Definition at line 58 of file bsfinancials-www/src/main/java/org/turro/financials/assets/FixedAssetWrapper.java.
59 if(
asset.isEmpty())
return null;
60 for(Component row : lines.getRows().getChildren()) {
61 if(((Row)row).getValue() instanceof DocumentLine) {
62 Checkbox cb = (Checkbox) row.getAttribute(
"cb");
63 if(cb !=
null && cb.isChecked()) {
64 DocumentLine dl = (DocumentLine) ((Row)row).getValue();
65 Iterator<DocumentLine> it =
asset.getDocumentLines().iterator();
67 if(it.next().getId() == dl.getId()) {
69 dl.setContractPreference(dl.getDocument().getDefaultContractPreference());
70 new DocumentWrapper(dl.getDocument()).save(
null,
null);
The documentation for this class was generated from the following file: