138 bar.addMenu(
"Financials", Permission.from(
"finan-contract",
"finan-document",
"finan-product",
"finan-account"))
140 .addMenu(
"Management", Permission.from(
"finan-contract:list",
"finan-document:list",
"finan-product:list"))
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)
149 .addMenuitem(
"New contract",
"contract_new", (EventListener) (Event event) -> {
151 },
true, Permission.from(
"finan-contract:new"))
152 .addMenuitem(
"New document",
"document_new", (EventListener) (Event event) -> {
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());
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) -> {
164 },
true, Permission.from(
"finan-document:new"))
165 .addMenuitem(
"New product",
"product_new", (EventListener) (Event event) -> {
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)
173 .addMenuitem(
"Handshakes",
"handshake",
"/financials/handshake/queue.zul",
true, Permission.from(
"finan-contract:list"))
174 .addToolbarSeparator(
true)
176 .addMenu(
"Portfolio", Permission.from(
"finan-contract:list",
"finan-document:list"))
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"))
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"))
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"))
198 .addMenu(
"Reports", Permission.from(
"finan-account:balance"))
200 .addCollecction(ReportBody.reports(), (esm, rb) -> {
201 esm.addMenuitem(rb.getName(), (EventListener) (Event event) -> {
202 HashMap<String, Object> map =
new HashMap<String, Object>();
204 showZulFile(rb.getName(),
"/financials/reports/report.zul", map);
208 .addObject(
new DiaryReport(), (esm, dr) -> {
209 dr.setLabel(I_.get(
"Diary book"));
213 .addObject(
new PrintBook(), (esm, pb) -> {
214 pb.setLabel(I_.get(
"Print book"));
218 .addMenuitem(
"Export diary", (EventListener) (Event event) -> {
219 DiaryReport.exportDiary();
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"))
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"))
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) -> {
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"))
245 .
addMenuitem(
"New register",
"register_new", (EventListener) (Event event) -> {
247 },
false, Permission.from(
"finan-register:new"))
249 .
addMenu(
"Treasury", Permission.from(
"finan-account:balance"))
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) -> {
257 },
false, Permission.from(
"finan-account:balance"))
258 .addMenuitem(
"Income book", (EventListener) (Event event) -> {
260 },
false, Permission.from(
"finan-account:balance"))
262 .
addMenu(
"Warnings", Permission.from(
"finan-contract:list",
"finan-document:list"))
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"))
271 .
addMenu(
"Models", Permission.from(
"finan-model:list"))
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");