BrightSide Workbench Full Report + Source Code
org.turro.financials.menu.FinancialsMenu Class Reference
Inheritance diagram for org.turro.financials.menu.FinancialsMenu:
Collaboration diagram for org.turro.financials.menu.FinancialsMenu:

Public Member Functions

void addToMenu (ElephantMenuBar bar)
 
- Public Member Functions inherited from org.turro.menu.ElephantMenu
 ElephantMenu ()
 
 ElephantMenu (String label)
 
 ElephantMenu (String label, String image)
 
ElephantMenuBar getMenuBar ()
 
ElephantMenu getParentMenu ()
 
ElephantSubmenu getParentSubmenu ()
 
ElephantSubmenu addSubmenu ()
 
int compareTo (ElephantMenu o)
 

Static Public Member Functions

static void showDocumentDefinition (Long id)
 
static void showContractDefinition (Long id)
 
static void showContract (Long id)
 
static void showDocument (Long id)
 
static void showBatchOf (Long id)
 
static void showDocument (Document doc)
 
static void showRegister (Long id)
 
static void showRegister (Register reg)
 
static void showProduct (Long id)
 
static void showStatement (String account)
 
static void showFixedAsset (Long id)
 
static void showCompanies ()
 
- Static Public Member Functions inherited from org.turro.menu.ElephantMenu
static String makeInclude (String include)
 
static void showEntity (Object id, String attribute, String label, String include)
 
static void showEntity (Object id, String attribute, String label, String include, Map< String, Object > dynProps)
 
static void showZulFile (String label, String include)
 
static void showZulFile (String label, String include, Map< String, Object > dynProps)
 
static void showModalZulFile (String label, String source, Command command)
 
static void showModalZulFile (String label, String include, Map args, Command command)
 
static void showPopupZulFile (String label, String include)
 
static void showPopupZulFile (String label, String include, Map args)
 
static void showEntityModal (Object id, String attribute, String include, Command command)
 

Additional Inherited Members

- Protected Member Functions inherited from org.turro.menu.ElephantMenu
void addToSessionMenu (ElephantSubmenu submenu)
 
void addToToolsMenu (ElephantSubmenu submenu)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 59 of file FinancialsMenu.java.

Member Function Documentation

◆ addToMenu()

void org.turro.financials.menu.FinancialsMenu.addToMenu ( ElephantMenuBar  bar)

Reimplemented from org.turro.menu.ElephantMenu.

Definition at line 137 of file FinancialsMenu.java.

137  {
138  bar.addMenu("Financials", Permission.from("finan-contract", "finan-document", "finan-product", "finan-account"))
139  .addSubmenu()
140  .addMenu("Management", Permission.from("finan-contract:list", "finan-document:list", "finan-product:list"))
141  .addSubmenu()
142  .addMenuitem("Contracts", "contract", "/financials/contract/contracts.zul", true, Permission.from("finan-contract:list"))
143  .addMenuitem("Documents", "document", "/financials/document/documents.zul", true, Permission.from("finan-document:list"))
144  .addMenuitem("Batch of", "batchof", "/financials/batchof/batchofs.zul", true, Permission.from("finan-document:list"))
145  .addMenuitem("Payrolls", "/financials/batchof/payrolls.zul", false, Permission.from("finan-document:list"))
146  .addMenuitem("Products", "product", "/financials/product/products.zul", true, Permission.from("finan-product:list"))
147  .addToolbarSeparator(true)
148  .addMenuSeparator()
149  .addMenuitem("New contract", "contract_new", (EventListener) (Event event) -> {
150  showContract(0L);
151  }, true, Permission.from("finan-contract:new"))
152  .addMenuitem("New document", "document_new", (EventListener) (Event event) -> {
153  showDocument(0L);
154  }, true, Permission.from("finan-document:new"))
155  .addMenuitem("New quick document", (EventListener) (Event event) -> {
156  Date now = new Date();
157  QuickDocument w = new QuickDocument(now, 0.0, "");
158  w.setPage(bar.getPage());
159  w.afterCompose();
160  Framework.getCurrent().showModal(I_.get("New document"), w, null);
161  }, Permission.from("finan-document:new"))
162  .addMenuitem("New batch of", "batchof_new", (EventListener) (Event event) -> {
163  showBatchOf(0L);
164  }, true, Permission.from("finan-document:new"))
165  .addMenuitem("New product", "product_new", (EventListener) (Event event) -> {
166  showProduct(0L);
167  }, true, Permission.from("finan-product:new"))
168  .addMenuitem("Import CSV", (EventListener) (Event event) -> {
169  ProductImport.uploadFile();
170  }, true, Permission.from("finan-product:new"))
171  .addToolbarSeparator(true)
172  .addMenuSeparator()
173  .addMenuitem("Handshakes", "handshake", "/financials/handshake/queue.zul", true, Permission.from("finan-contract:list"))
174  .addToolbarSeparator(true)
175  .getParentSubmenu()
176  .addMenu("Portfolio", Permission.from("finan-contract:list", "finan-document:list"))
177  .addSubmenu()
178  .addMenuitem("Portfolio", "portfolio", "/financials/document/portfolio.zul", true)
179  .addMenuitem("Documents statement", "/financials/contract/documentsStatement.zul")
180  .addMenuitem("Portfolio status", "/financials/document/portfolioStatus.zul")
182  .addMenuitem("Portfolio disagreements", "/financials/document/portfolioDisagreements.zul")
183  .addMenuitem("Portfolio errors", "/financials/document/portfolioErrors.zul")
185  .addMenuitem("Portfolio by entity", "/financials/entities/portfolio.zul")
187  .addMenu("POS", Permission.from("class:org.turro.pos.financials.ExportData"))
188  .addSubmenu()
189  .addMenuitem("Export", (EventListener) (Event event) -> {
190  Reflections.of("org.turro.pos.financials.ExportProducts").invoke("execute");
191  }, false, Permission.from("finan-product:list"))
193  .addMenu("Accounting", Permission.from("finan-account:statement", "finan-account:balance", "finan-register:new"))
194  .addSubmenu()
195  .addMenuitem("Account statement", "statement", "/financials/account/statement.zul", true, Permission.from("finan-account:statement"))
196  .addMenuitem("Account balance", "/financials/account/balance.zul", Permission.from("finan-account:balance"))
197  //.addMenuitem("Accounts report", "/financials/account/report.zul", Permission.from("finan-account:balance"))
198  .addMenu("Reports", Permission.from("finan-account:balance"))
199  .addSubmenu()
200  .addCollecction(ReportBody.reports(), (esm, rb) -> {
201  esm.addMenuitem(rb.getName(), (EventListener) (Event event) -> {
202  HashMap<String, Object> map = new HashMap<String, Object>();
203  map.put("body", rb);
204  showZulFile(rb.getName(), "/financials/reports/report.zul", map);
205  });
206  })
208  .addObject(new DiaryReport(), (esm, dr) -> {
209  dr.setLabel(I_.get("Diary book"));
210  esm.appendChild(dr);
211  dr.afterCompose();
212  })
213  .addObject(new PrintBook(), (esm, pb) -> {
214  pb.setLabel(I_.get("Print book"));
215  esm.appendChild(pb);
216  pb.afterCompose();
217  })
218  .addMenuitem("Export diary", (EventListener) (Event event) -> {
219  DiaryReport.exportDiary();
220  }, false)
221  .addMenuitem("Export account balance", (EventListener) (Event event) -> {
222  exportAccountBalance(bar);
223  }, false, Permission.from("finan-account:balance"))
224  .addMenuitem("Annual statement transactions", (EventListener) (Event event) -> {
225  exportAnnualTransactions(bar);
226  }, false, Permission.from("finan-account:balance"))
227  .addMenuitem("Report sheets", (EventListener) (Event event) -> {
228  new FinancialsSheets().exportSheet(bar.getPage());
229  }, false, Permission.from("finan-account:balance"))
230  .addMenuitem("Operating", "linechart", "/financials/business/operating.zul", Permission.from("finan-account:balance"))
231  .addMenuSeparator()
232  .addMenuitem("Views", "/financials/view/views.zul", Permission.from("finan-model:list"))
233  .addMenuitem("Books", "/financials/book/books.zul", Permission.from("finan-model:list"))
234  .addMenuitem("Major accounts", "/financials/account/majors.zul", Permission.from("finan-model:list"))
235  .addMenuitem("Accounts", "/financials/account/accounts.zul", Permission.from("finan-model:list"))
236  .addMenuSeparator()
237  .addMenuitem("Fixed assets", "asset", "/financials/asset/fixedAssets.zul", Permission.from("finan-fixed-asset:list"))
238  .addMenuitem("New fixed asset", "asset_new", (EventListener) (Event event) -> {
239  showFixedAsset(0L);
240  }, false, Permission.from("finan-fixed-asset:list"))
241  .addMenuitem("Depreciations", (EventListener) (Event event) -> {
242  FixedAssetWrapper.doDepreciations(bar.getPage());
243  }, false, Permission.from("finan-fixed-asset:list"))
244  .addMenuSeparator()
245  .addMenuitem("New register", "register_new", (EventListener) (Event event) -> {
246  showRegister(0L);
247  }, false, Permission.from("finan-register:new"))
249  .addMenu("Treasury", Permission.from("finan-account:balance"))
250  .addSubmenu()
251  .addMenuitem("Model 111, 115, 123", "/financials/treasury/model111.zul")
252  .addMenuitem("Model 303 Quarter", "/financials/treasury/model303.zul")
253  .addMenuitem("Model 303 Month", "/financials/treasury/model303m.zul")
254  .addMenuitem("Settlement", "/financials/treasury/settlement.zul")
255  .addMenuitem("Expenses book", (EventListener) (Event event) -> {
256  expensesBook(bar);
257  }, false, Permission.from("finan-account:balance"))
258  .addMenuitem("Income book", (EventListener) (Event event) -> {
259  incomeBook(bar);
260  }, false, Permission.from("finan-account:balance"))
262  .addMenu("Warnings", Permission.from("finan-contract:list", "finan-document:list"))
263  .addSubmenu()
264  .addMenuitem("Disagreements in contacts", "/financials/contract/contactDisagreements.zul", Permission.from("finan-contract:list"))
265  .addMenuitem("Update Usuals", (EventListener) (Event event) -> {
266  new UsualUpdate().update();
267  }, false, Permission.from("finan-document:list"))
268  .addMenuitem("Non balanced registers", "/financials/register/nonBalanced.zul", Permission.from("finan-register:list"))
270  .addToolbarSeparator(true)
271  .addMenu("Models", Permission.from("finan-model:list"))
272  .addSubmenu()
273  .addMenuitem("Viewer", "/financials/ctcdef/viewer.zul")
275  .addMenuitem("Companies", "/financials/business/companies.zul")
277  .addMenuitem("Contract models", "/financials/ctcdef/contracts.zul")
278  .addMenuitem("Document models", "/financials/docdef/documents.zul")
279  .addMenuitem("Line types", "/financials/linetype/lineTypes.zul")
281  .addMenuitem("Notes", "/financials/ctcdef/notes.zul");
282  }
ElephantSubmenu getParentSubmenu()
ElephantSubmenu addSubmenu()
static void showZulFile(String label, String include)
ElephantMenu addMenu(String label)
ElephantSubmenu addMenuitem(String label, String include)
ElephantSubmenu addToolbarSeparator(boolean bar)
Here is the call graph for this function:

◆ showBatchOf()

static void org.turro.financials.menu.FinancialsMenu.showBatchOf ( Long  id)
static

Definition at line 300 of file FinancialsMenu.java.

300  {
301  showEntity(id, "batchOfId", "Batch of", "/financials/batchof/batchof.zul");
302  }
static void showEntity(Object id, String attribute, String label, String include)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showCompanies()

static void org.turro.financials.menu.FinancialsMenu.showCompanies ( )
static

Definition at line 333 of file FinancialsMenu.java.

333  {
334  showZulFile("Companies", "/financials/business/companies.zul");
335  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showContract()

static void org.turro.financials.menu.FinancialsMenu.showContract ( Long  id)
static

Definition at line 292 of file FinancialsMenu.java.

292  {
293  showEntity(id, "contractId", "Contract", "/financials/contract/contract.zul");
294  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showContractDefinition()

static void org.turro.financials.menu.FinancialsMenu.showContractDefinition ( Long  id)
static

Definition at line 288 of file FinancialsMenu.java.

288  {
289  showEntity(id, "ctcdefId", "Contract model", "/financials/ctcdef/contract.zul");
290  }
Here is the call graph for this function:

◆ showDocument() [1/2]

static void org.turro.financials.menu.FinancialsMenu.showDocument ( Document  doc)
static

Definition at line 304 of file FinancialsMenu.java.

304  {
305  HashMap<String, Object> map = new HashMap<String, Object>();
306  map.put("documentGenerated", doc);
307  showEntity(doc.getId(), "documentId", "Document", "/financials/document/document.zul", map);
308  }
Here is the call graph for this function:

◆ showDocument() [2/2]

static void org.turro.financials.menu.FinancialsMenu.showDocument ( Long  id)
static

Definition at line 296 of file FinancialsMenu.java.

296  {
297  showEntity(id, "documentId", "Document", "/financials/document/document.zul");
298  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showDocumentDefinition()

static void org.turro.financials.menu.FinancialsMenu.showDocumentDefinition ( Long  id)
static

Definition at line 284 of file FinancialsMenu.java.

284  {
285  showEntity(id, "docdefId", "Document model", "/financials/docdef/document.zul");
286  }
Here is the call graph for this function:

◆ showFixedAsset()

static void org.turro.financials.menu.FinancialsMenu.showFixedAsset ( Long  id)
static

Definition at line 329 of file FinancialsMenu.java.

329  {
330  showEntity(id, "fixedAssetId", "Fixed asset", "/financials/asset/fixedAsset.zul");
331  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showProduct()

static void org.turro.financials.menu.FinancialsMenu.showProduct ( Long  id)
static

Definition at line 320 of file FinancialsMenu.java.

320  {
321  showEntity(id, "productId", "Product", "/financials/product/product.zul");
322  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showRegister() [1/2]

static void org.turro.financials.menu.FinancialsMenu.showRegister ( Long  id)
static

Definition at line 310 of file FinancialsMenu.java.

310  {
311  showEntity(id, "registerId", "Register", "/financials/register/register.zul");
312  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showRegister() [2/2]

static void org.turro.financials.menu.FinancialsMenu.showRegister ( Register  reg)
static

Definition at line 314 of file FinancialsMenu.java.

314  {
315  HashMap<String, Object> map = new HashMap<String, Object>();
316  map.put("registerGenerated", reg);
317  showEntity(reg.getId(), "registerId", "Register", "/financials/register/register.zul", map);
318  }
Here is the call graph for this function:

◆ showStatement()

static void org.turro.financials.menu.FinancialsMenu.showStatement ( String  account)
static

Definition at line 324 of file FinancialsMenu.java.

324  {
325  Executions.getCurrent().getDesktop().setAttribute("statementId", account);
326  showEntity(0L, "none", "Account statement", "/financials/account/statement.zul");
327  }
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: