use of org.apache.isis.applib.annotation.ActionLayout in project estatio by estatio.
the class IncomingInvoice_approveAsCorporateManager method act.
@Action(domainEvent = IncomingInvoice_next.ActionDomainEvent.class, semantics = SemanticsOf.IDEMPOTENT)
@ActionLayout(cssClassFa = "fa-thumbs-o-up")
public Object act(@Nullable final String comment, final boolean goToNext) {
final IncomingInvoice next = nextAfterPendingIfRequested(goToNext);
trigger(comment, null);
return objectToReturn(next);
}
use of org.apache.isis.applib.annotation.ActionLayout in project estatio by estatio.
the class IncomingInvoice_approveLocalAsCountryDirector method act.
@Action(domainEvent = ActionDomainEvent.class, semantics = SemanticsOf.IDEMPOTENT)
@ActionLayout(cssClassFa = "fa-thumbs-up")
public Object act(@Nullable final String comment, final boolean goToNext) {
final IncomingInvoice next = nextAfterPendingIfRequested(goToNext);
trigger(comment, null);
return objectToReturn(next);
}
use of org.apache.isis.applib.annotation.ActionLayout in project estatio by estatio.
the class Document_categoriseAsOrder method act.
@Action(domainEvent = ActionDomainEvent.class, semantics = SemanticsOf.IDEMPOTENT)
@ActionLayout(cssClassFa = "folder-open-o")
public Object act(@Nullable final Property property, @Nullable final String comment) {
final Document document = getDomainObject();
document.setType(DocumentTypeData.INCOMING_ORDER.findUsing(documentTypeRepository));
// create order
final Order order = orderRepository.create(property, // order number
null, // sellerOrderReference
null, // entryDate
clockService.now(), // orderDate
null, // seller
null, // buyer
buyerFinder.buyerDerivedFromDocumentName(document), document.getAtPath(), // approval state... will cause state transition to be created automatically by subscriber
null);
paperclipRepository.attach(document, null, order);
trigger(comment, null);
return order;
}
use of org.apache.isis.applib.annotation.ActionLayout in project estatio by estatio.
the class Document_categoriseAsPropertyInvoice method act.
@Action(domainEvent = ActionDomainEvent.class, semantics = SemanticsOf.IDEMPOTENT)
@ActionLayout(cssClassFa = "folder-open-o")
public Object act(final Property property, @Nullable final String comment) {
final Document document = getDomainObject();
document.setType(DocumentTypeData.INCOMING_INVOICE.findUsing(documentTypeRepository));
LocalDate dateReceived = document.getCreatedAt().toLocalDate();
LocalDate dueDate = document.getCreatedAt().toLocalDate().plusDays(30);
final IncomingInvoice incomingInvoice = incomingInvoiceRepository.create(// EST-1508: the users prefer no default
null, // invoiceNumber
null, property, document.getAtPath(), // buyer
buyerFinder.buyerDerivedFromDocumentName(document), // seller
null, // invoiceDate
null, dueDate, null, InvoiceStatus.NEW, dateReceived, // bankAccount
null, // approval state... will cause state transition to be created automatically by subscriber
null);
paperclipRepository.attach(document, null, incomingInvoice);
trigger(comment, null);
return incomingInvoice;
}
use of org.apache.isis.applib.annotation.ActionLayout in project estatio by estatio.
the class Document_categoriseAsOtherInvoice method act.
@Action(domainEvent = ActionDomainEvent.class, semantics = SemanticsOf.IDEMPOTENT)
@ActionLayout(cssClassFa = "folder-open-o")
public Object act(final IncomingInvoiceType incomingInvoiceType, @Nullable final String comment) {
final Document document = getDomainObject();
document.setType(DocumentTypeData.INCOMING_INVOICE.findUsing(documentTypeRepository));
LocalDate dateReceived = document.getCreatedAt().toLocalDate();
LocalDate dueDate = document.getCreatedAt().toLocalDate().plusDays(30);
final IncomingInvoice incomingInvoice = incomingInvoiceRepository.create(incomingInvoiceType, // invoiceNumber
null, // property
null, document.getAtPath(), // buyer
buyerFinder.buyerDerivedFromDocumentName(document), // seller
null, // invoiceDate
null, dueDate, null, InvoiceStatus.NEW, dateReceived, // bankAccount
null, // approval state... will cause state transition to be created automatically by subscriber
null);
paperclipRepository.attach(document, null, incomingInvoice);
trigger(comment, null);
return incomingInvoice;
}
Aggregations