Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 22 additions & 22 deletions codbex-invoices/codbex-invoices.edm

Large diffs are not rendered by default.

278 changes: 278 additions & 0 deletions codbex-invoices/codbex-invoices.gen

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions codbex-invoices/codbex-invoices.model
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@
"menuIndex": "100",
"menuKey": "salesinvoiceitem",
"menuLabel": "SalesInvoiceItem",
"multilingual": "false",
"name": "SalesInvoiceItem",
"perspectiveHeader": "",
"perspectiveIcon": "/services/web/resources/unicons/invoice.svg",
Expand Down Expand Up @@ -609,6 +610,7 @@
"menuIndex": "100",
"menuKey": "salesinvoice",
"menuLabel": "SalesInvoice",
"multilingual": "false",
"name": "SalesInvoice",
"perspectiveHeader": "",
"perspectiveIcon": "/services/web/resources/unicons/invoice.svg",
Expand Down Expand Up @@ -1050,6 +1052,7 @@
"menuIndex": "100",
"menuKey": "purchaseinvoice",
"menuLabel": "PurchaseInvoice",
"multilingual": "false",
"name": "PurchaseInvoice",
"perspectiveHeader": "",
"perspectiveIcon": "/services/web/resources/unicons/receipt.svg",
Expand Down Expand Up @@ -1244,6 +1247,7 @@
"menuIndex": "100",
"menuKey": "purchaseinvoiceitem",
"menuLabel": "PurchaseInvoiceItem",
"multilingual": "false",
"name": "PurchaseInvoiceItem",
"perspectiveHeader": "",
"perspectiveIcon": "/services/web/resources/unicons/receipt.svg",
Expand Down Expand Up @@ -1302,6 +1306,7 @@
"menuIndex": "100",
"menuKey": "salesinvoicestatus",
"menuLabel": "SalesInvoiceStatus",
"multilingual": "false",
"name": "SalesInvoiceStatus",
"perspectiveHeader": "",
"perspectiveIcon": "/services/web/resources/unicons/copy.svg",
Expand Down Expand Up @@ -1360,6 +1365,7 @@
"menuIndex": "100",
"menuKey": "purchaseinvoicestatus",
"menuLabel": "PurchaseInvoiceStatus",
"multilingual": "false",
"name": "PurchaseInvoiceStatus",
"perspectiveHeader": "",
"perspectiveIcon": "/services/web/resources/unicons/copy.svg",
Expand Down Expand Up @@ -1561,6 +1567,7 @@
"menuIndex": "100",
"menuKey": "customer",
"menuLabel": "Customer",
"multilingual": "false",
"name": "Customer",
"perspectiveHeader": "",
"perspectiveIcon": "/services/web/resources/unicons/user-plus.svg",
Expand Down Expand Up @@ -1762,6 +1769,7 @@
"menuIndex": "100",
"menuKey": "supplier",
"menuLabel": "Supplier",
"multilingual": "false",
"name": "Supplier",
"perspectiveHeader": "",
"perspectiveIcon": "/services/web/resources/unicons/user-minus.svg",
Expand Down Expand Up @@ -1963,6 +1971,7 @@
"menuIndex": "100",
"menuKey": "company",
"menuLabel": "Company",
"multilingual": "false",
"name": "Company",
"perspectiveHeader": "",
"perspectiveIcon": "/services/web/resources/unicons/university.svg",
Expand Down Expand Up @@ -2095,6 +2104,7 @@
"menuIndex": "100",
"menuKey": "currency",
"menuLabel": "Currency",
"multilingual": "false",
"name": "Currency",
"perspectiveHeader": "",
"perspectiveIcon": "/services/web/resources/unicons/dollar-alt.svg",
Expand Down Expand Up @@ -2261,6 +2271,7 @@
"menuIndex": "100",
"menuKey": "employee",
"menuLabel": "Employee",
"multilingual": "false",
"name": "Employee",
"perspectiveHeader": "",
"perspectiveIcon": "/services/web/resources/unicons/users-alt.svg",
Expand Down Expand Up @@ -2361,6 +2372,7 @@
"menuIndex": "100",
"menuKey": "salesinvoicepayment",
"menuLabel": "SalesInvoicePayment",
"multilingual": "false",
"name": "SalesInvoicePayment",
"perspectiveHeader": "",
"perspectiveIcon": "/services/web/resources/unicons/invoice.svg",
Expand Down Expand Up @@ -2461,6 +2473,7 @@
"menuIndex": "100",
"menuKey": "purchaseinvoicepayment",
"menuLabel": "PurchaseInvoicePayment",
"multilingual": "false",
"name": "PurchaseInvoicePayment",
"perspectiveHeader": "",
"perspectiveIcon": "/services/web/resources/unicons/receipt.svg",
Expand Down Expand Up @@ -2624,6 +2637,7 @@
"menuIndex": "100",
"menuKey": "uom",
"menuLabel": "UoM",
"multilingual": "false",
"name": "UoM",
"perspectiveHeader": "",
"perspectiveIcon": "/services/web/resources/unicons/arrows-resize-v.svg",
Expand Down Expand Up @@ -2696,6 +2710,7 @@
"menuIndex": "100",
"menuKey": "salesinvoicetype",
"menuLabel": "SalesInvoiceType",
"multilingual": "false",
"name": "SalesInvoiceType",
"perspectiveHeader": "",
"perspectiveIcon": "/services/web/resources/unicons/copy.svg",
Expand Down Expand Up @@ -3070,6 +3085,7 @@
"menuIndex": "100",
"menuKey": "salesorder",
"menuLabel": "SalesOrder",
"multilingual": "false",
"name": "SalesOrder",
"perspectiveHeader": "",
"perspectiveIcon": "/services/web/resources/unicons/receipt.svg",
Expand Down Expand Up @@ -3151,6 +3167,7 @@
"menuIndex": "100",
"menuKey": "deduction",
"menuLabel": "Deduction",
"multilingual": "false",
"name": "Deduction",
"perspectiveHeader": "",
"perspectiveIcon": "/services/web/resources/unicons/invoice.svg",
Expand Down Expand Up @@ -3223,6 +3240,7 @@
"menuIndex": "100",
"menuKey": "purchaseinvoicetype",
"menuLabel": "PurchaseInvoiceType",
"multilingual": "false",
"name": "PurchaseInvoiceType",
"perspectiveHeader": "",
"perspectiveIcon": "/services/web/resources/unicons/copy.svg",
Expand Down Expand Up @@ -3279,6 +3297,7 @@
"menuIndex": "100",
"menuKey": "paymentmethod",
"menuLabel": "PaymentMethod",
"multilingual": "false",
"name": "PaymentMethod",
"perspectiveHeader": "",
"perspectiveIcon": "/services/web/resources/unicons/archive.svg",
Expand Down Expand Up @@ -3335,6 +3354,7 @@
"menuIndex": "100",
"menuKey": "sentmethod",
"menuLabel": "SentMethod",
"multilingual": "false",
"name": "SentMethod",
"perspectiveHeader": "",
"perspectiveIcon": "/services/web/resources/unicons/archive.svg",
Expand Down Expand Up @@ -3601,6 +3621,7 @@
"menuIndex": "100",
"menuKey": "customerpayment",
"menuLabel": "CustomerPayment",
"multilingual": "false",
"name": "CustomerPayment",
"perspectiveHeader": "",
"perspectiveIcon": "/services/web/resources/unicons/usd-square.svg",
Expand Down Expand Up @@ -3849,6 +3870,7 @@
"menuIndex": "100",
"menuKey": "supplierpayment",
"menuLabel": "SupplierPayment",
"multilingual": "false",
"name": "SupplierPayment",
"perspectiveHeader": "",
"perspectiveIcon": "/services/web/resources/unicons/box.svg",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Controller, Get, Post, Put, Delete, response } from "sdk/http"
import { Extensions } from "sdk/extensions"
import { Controller, Get, Post, Put, Delete, request, response } from "@aerokit/sdk/http"
import { Extensions } from "@aerokit/sdk/extensions"
import { CustomerPaymentRepository, CustomerPaymentEntityOptions } from "../../dao/CustomerPayment/CustomerPaymentRepository";
import { ValidationError } from "../utils/ValidationError";
import { HttpUtils } from "../utils/HttpUtils";
Expand All @@ -16,7 +16,8 @@ class CustomerPaymentService {
try {
const options: CustomerPaymentEntityOptions = {
$limit: ctx.queryParameters["$limit"] ? parseInt(ctx.queryParameters["$limit"]) : undefined,
$offset: ctx.queryParameters["$offset"] ? parseInt(ctx.queryParameters["$offset"]) : undefined
$offset: ctx.queryParameters["$offset"] ? parseInt(ctx.queryParameters["$offset"]) : undefined,
$language: request.getLocale().slice(0, 2)
};

return this.repository.findAll(options);
Expand Down Expand Up @@ -69,7 +70,10 @@ class CustomerPaymentService {
public getById(_: any, ctx: any) {
try {
const id = parseInt(ctx.pathParameters.id);
const entity = this.repository.findById(id);
const options: CustomerPaymentEntityOptions = {
$language: request.getLocale().slice(0, 2)
};
const entity = this.repository.findById(id, options);
if (entity) {
return entity;
} else {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Controller, Get, Post, Put, Delete, response } from "sdk/http"
import { Extensions } from "sdk/extensions"
import { Controller, Get, Post, Put, Delete, request, response } from "@aerokit/sdk/http"
import { Extensions } from "@aerokit/sdk/extensions"
import { PurchaseInvoiceItemRepository, PurchaseInvoiceItemEntityOptions } from "../../dao/PurchaseInvoice/PurchaseInvoiceItemRepository";
import { user } from "sdk/security"
import { user } from "@aerokit/sdk/security"
import { ForbiddenError } from "../utils/ForbiddenError";
import { ValidationError } from "../utils/ValidationError";
import { HttpUtils } from "../utils/HttpUtils";
Expand All @@ -19,7 +19,8 @@ class PurchaseInvoiceItemService {
this.checkPermissions("read");
const options: PurchaseInvoiceItemEntityOptions = {
$limit: ctx.queryParameters["$limit"] ? parseInt(ctx.queryParameters["$limit"]) : undefined,
$offset: ctx.queryParameters["$offset"] ? parseInt(ctx.queryParameters["$offset"]) : undefined
$offset: ctx.queryParameters["$offset"] ? parseInt(ctx.queryParameters["$offset"]) : undefined,
$language: request.getLocale().slice(0, 2)
};

let PurchaseInvoice = parseInt(ctx.queryParameters.PurchaseInvoice);
Expand Down Expand Up @@ -88,7 +89,10 @@ class PurchaseInvoiceItemService {
try {
this.checkPermissions("read");
const id = parseInt(ctx.pathParameters.id);
const entity = this.repository.findById(id);
const options: PurchaseInvoiceItemEntityOptions = {
$language: request.getLocale().slice(0, 2)
};
const entity = this.repository.findById(id, options);
if (entity) {
return entity;
} else {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Controller, Get, Post, Put, Delete, response } from "sdk/http"
import { Extensions } from "sdk/extensions"
import { Controller, Get, Post, Put, Delete, request, response } from "@aerokit/sdk/http"
import { Extensions } from "@aerokit/sdk/extensions"
import { PurchaseInvoicePaymentRepository, PurchaseInvoicePaymentEntityOptions } from "../../dao/PurchaseInvoice/PurchaseInvoicePaymentRepository";
import { user } from "sdk/security"
import { user } from "@aerokit/sdk/security"
import { ForbiddenError } from "../utils/ForbiddenError";
import { ValidationError } from "../utils/ValidationError";
import { HttpUtils } from "../utils/HttpUtils";
Expand All @@ -19,7 +19,8 @@ class PurchaseInvoicePaymentService {
this.checkPermissions("read");
const options: PurchaseInvoicePaymentEntityOptions = {
$limit: ctx.queryParameters["$limit"] ? parseInt(ctx.queryParameters["$limit"]) : undefined,
$offset: ctx.queryParameters["$offset"] ? parseInt(ctx.queryParameters["$offset"]) : undefined
$offset: ctx.queryParameters["$offset"] ? parseInt(ctx.queryParameters["$offset"]) : undefined,
$language: request.getLocale().slice(0, 2)
};

let PurchaseInvoice = parseInt(ctx.queryParameters.PurchaseInvoice);
Expand Down Expand Up @@ -88,7 +89,10 @@ class PurchaseInvoicePaymentService {
try {
this.checkPermissions("read");
const id = parseInt(ctx.pathParameters.id);
const entity = this.repository.findById(id);
const options: PurchaseInvoicePaymentEntityOptions = {
$language: request.getLocale().slice(0, 2)
};
const entity = this.repository.findById(id, options);
if (entity) {
return entity;
} else {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Controller, Get, Post, Put, Delete, response } from "sdk/http"
import { Extensions } from "sdk/extensions"
import { Controller, Get, Post, Put, Delete, request, response } from "@aerokit/sdk/http"
import { Extensions } from "@aerokit/sdk/extensions"
import { PurchaseInvoiceRepository, PurchaseInvoiceEntityOptions } from "../../dao/PurchaseInvoice/PurchaseInvoiceRepository";
import { user } from "sdk/security"
import { user } from "@aerokit/sdk/security"
import { ForbiddenError } from "../utils/ForbiddenError";
import { ValidationError } from "../utils/ValidationError";
import { HttpUtils } from "../utils/HttpUtils";
Expand All @@ -21,7 +21,8 @@ class PurchaseInvoiceService {
this.checkPermissions("read");
const options: PurchaseInvoiceEntityOptions = {
$limit: ctx.queryParameters["$limit"] ? parseInt(ctx.queryParameters["$limit"]) : undefined,
$offset: ctx.queryParameters["$offset"] ? parseInt(ctx.queryParameters["$offset"]) : undefined
$offset: ctx.queryParameters["$offset"] ? parseInt(ctx.queryParameters["$offset"]) : undefined,
$language: request.getLocale().slice(0, 2)
};

return this.repository.findAll(options);
Expand Down Expand Up @@ -79,7 +80,10 @@ class PurchaseInvoiceService {
try {
this.checkPermissions("read");
const id = parseInt(ctx.pathParameters.id);
const entity = this.repository.findById(id);
const options: PurchaseInvoiceEntityOptions = {
$language: request.getLocale().slice(0, 2)
};
const entity = this.repository.findById(id, options);
if (entity) {
return entity;
} else {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Controller, Get, Post, Put, Delete, response } from "sdk/http"
import { Extensions } from "sdk/extensions"
import { Controller, Get, Post, Put, Delete, request, response } from "@aerokit/sdk/http"
import { Extensions } from "@aerokit/sdk/extensions"
import { DeductionRepository, DeductionEntityOptions } from "../../dao/SalesInvoice/DeductionRepository";
import { user } from "sdk/security"
import { user } from "@aerokit/sdk/security"
import { ForbiddenError } from "../utils/ForbiddenError";
import { ValidationError } from "../utils/ValidationError";
import { HttpUtils } from "../utils/HttpUtils";
Expand All @@ -19,7 +19,8 @@ class DeductionService {
this.checkPermissions("read");
const options: DeductionEntityOptions = {
$limit: ctx.queryParameters["$limit"] ? parseInt(ctx.queryParameters["$limit"]) : undefined,
$offset: ctx.queryParameters["$offset"] ? parseInt(ctx.queryParameters["$offset"]) : undefined
$offset: ctx.queryParameters["$offset"] ? parseInt(ctx.queryParameters["$offset"]) : undefined,
$language: request.getLocale().slice(0, 2)
};

let DeductionInvoice = parseInt(ctx.queryParameters.DeductionInvoice);
Expand Down Expand Up @@ -88,7 +89,10 @@ class DeductionService {
try {
this.checkPermissions("read");
const id = parseInt(ctx.pathParameters.id);
const entity = this.repository.findById(id);
const options: DeductionEntityOptions = {
$language: request.getLocale().slice(0, 2)
};
const entity = this.repository.findById(id, options);
if (entity) {
return entity;
} else {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Controller, Get, Post, Put, Delete, response } from "sdk/http"
import { Extensions } from "sdk/extensions"
import { Controller, Get, Post, Put, Delete, request, response } from "@aerokit/sdk/http"
import { Extensions } from "@aerokit/sdk/extensions"
import { SalesInvoiceItemRepository, SalesInvoiceItemEntityOptions } from "../../dao/SalesInvoice/SalesInvoiceItemRepository";
import { user } from "sdk/security"
import { user } from "@aerokit/sdk/security"
import { ForbiddenError } from "../utils/ForbiddenError";
import { ValidationError } from "../utils/ValidationError";
import { HttpUtils } from "../utils/HttpUtils";
Expand All @@ -19,7 +19,8 @@ class SalesInvoiceItemService {
this.checkPermissions("read");
const options: SalesInvoiceItemEntityOptions = {
$limit: ctx.queryParameters["$limit"] ? parseInt(ctx.queryParameters["$limit"]) : undefined,
$offset: ctx.queryParameters["$offset"] ? parseInt(ctx.queryParameters["$offset"]) : undefined
$offset: ctx.queryParameters["$offset"] ? parseInt(ctx.queryParameters["$offset"]) : undefined,
$language: request.getLocale().slice(0, 2)
};

let SalesInvoice = parseInt(ctx.queryParameters.SalesInvoice);
Expand Down Expand Up @@ -88,7 +89,10 @@ class SalesInvoiceItemService {
try {
this.checkPermissions("read");
const id = parseInt(ctx.pathParameters.id);
const entity = this.repository.findById(id);
const options: SalesInvoiceItemEntityOptions = {
$language: request.getLocale().slice(0, 2)
};
const entity = this.repository.findById(id, options);
if (entity) {
return entity;
} else {
Expand Down
Loading