use of com.axelor.apps.supplierportal.service.SupplierViewService in project axelor-open-suite by axelor.
the class SupplierViewController method getPurchaseQuotationInProgress.
public void getPurchaseQuotationInProgress(ActionRequest request, ActionResponse response) {
try {
SupplierViewService supplierViewService = Beans.get(SupplierViewService.class);
User user = supplierViewService.getSupplierUser();
String domain = Beans.get(SupplierViewService.class).getPurchaseQuotationsInProgressOfSupplier(user);
response.setView(ActionView.define(I18n.get("Quotation In Progress")).model(PurchaseOrder.class.getName()).add("grid", "purchase-order-grid").add("form", "purchase-order-form").domain(domain).map());
} catch (Exception e) {
TraceBackService.trace(response, e);
}
}
use of com.axelor.apps.supplierportal.service.SupplierViewService in project axelor-open-suite by axelor.
the class SupplierViewController method getTotalRemaining.
public void getTotalRemaining(ActionRequest request, ActionResponse response) {
try {
SupplierViewService supplierViewService = Beans.get(SupplierViewService.class);
User user = supplierViewService.getSupplierUser();
String domain = Beans.get(SupplierViewService.class).getTotalRemainingOfSupplier(user);
response.setView(ActionView.define(I18n.get("Total remaining")).model(Invoice.class.getName()).add("grid", "invoice-grid").add("form", "invoice-form").domain(domain).map());
} catch (Exception e) {
TraceBackService.trace(response, e);
}
}
use of com.axelor.apps.supplierportal.service.SupplierViewService in project axelor-open-suite by axelor.
the class SupplierViewController method getNextDelivery.
public void getNextDelivery(ActionRequest request, ActionResponse response) {
try {
SupplierViewService supplierViewService = Beans.get(SupplierViewService.class);
User user = supplierViewService.getSupplierUser();
String domain = Beans.get(SupplierViewService.class).getNextDeliveryOfSupplier(user);
StockMove stockMove = Beans.get(StockMoveRepository.class).all().filter(domain).fetchOne();
if (stockMove != null) {
response.setView(ActionView.define(I18n.get("Next delivery")).model(StockMove.class.getName()).add("form", "stock-move-supplier-form").domain(domain).context("_showRecord", stockMove.getId()).map());
}
} catch (Exception e) {
TraceBackService.trace(response, e);
}
}
use of com.axelor.apps.supplierportal.service.SupplierViewService in project axelor-open-suite by axelor.
the class SupplierViewController method getPurchaseOrders.
/* PurchaseOrder OnClick */
public void getPurchaseOrders(ActionRequest request, ActionResponse response) {
try {
SupplierViewService supplierViewService = Beans.get(SupplierViewService.class);
User user = supplierViewService.getSupplierUser();
String domain = Beans.get(SupplierViewService.class).getPurchaseOrdersOfSupplier(user);
response.setView(ActionView.define(I18n.get("Purchase orders")).model(PurchaseOrder.class.getName()).add("grid", "purchase-order-grid").add("form", "purchase-order-form").domain(domain).map());
} catch (Exception e) {
TraceBackService.trace(response, e);
}
}
Aggregations