Examples of Tax


Examples of org.bigk.invoices.model.Tax

          + ") - start");
    }

    // read and set Tax object
    if (invoicePosition.getTaxId() != null) {
      Tax tax = taxesService.getTax(invoicePosition.getTaxId());
      invoicePosition.setTax(tax);
    }
   
    // set parent of this position
    invoicePosition.setInvoice(invoice);
View Full Code Here

Examples of org.bigk.invoices.model.Tax

          + ", Long idx=" + idx + ") - start");
    }
   
    // read and set Tax object
    if (invoicePosition.getTaxId() != null) {
      Tax tax = taxesService.getTax(invoicePosition.getTaxId());
      invoicePosition.setTax(tax);
    }
   
    // set parent of this position
    invoicePosition.setInvoice(invoice);
View Full Code Here

Examples of org.bigk.invoices.model.Tax

 
  @Override
  public Tax getTax(Long id) throws ServiceException {
    logger.debug("getTax(id=[{}]) - start", + id);

    Tax tax = em.find(Tax.class, id);

    logger.debug("getTax(Long) - end - return value=[{}]", tax);
    return tax;
  }
View Full Code Here

Examples of org.bigk.invoices.model.Tax

  public Tax getTax(Long id) throws ServiceException {
    if (logger.isDebugEnabled()) {
      logger.debug("getTax(Long id=" + id + ") - start");
    }

    Tax object = null;
    Session session = null;
    try {
      session = HibernateUtils.getCurrentSession();
      object = (Tax) session.get(Tax.class, id);
     
View Full Code Here

Examples of org.hoteia.qalingo.core.domain.Tax

        Criteria criteria = createDefaultCriteria(Tax.class);
       
        FetchPlan fetchPlan = handleSpecificFetchMode(criteria, params);
       
        criteria.add(Restrictions.eq("id", taxId));
        Tax tax = (Tax) criteria.uniqueResult();
        if(tax != null){
            tax.setFetchPlan(fetchPlan);
        }
        return tax;
  }
View Full Code Here

Examples of org.hoteia.qalingo.core.domain.Tax

        Criteria criteria = createDefaultCriteria(Tax.class);

        FetchPlan fetchPlan = handleSpecificFetchMode(criteria, params);

        criteria.add(Restrictions.eq("code", handleCodeValue(taxCode)));
        Tax tax = (Tax) criteria.uniqueResult();
        if(tax != null){
            tax.setFetchPlan(fetchPlan);
        }
        return tax;
    }
View Full Code Here

Examples of org.hoteia.qalingo.core.domain.Tax

  public Tax saveOrUpdateTax(final Tax tax) {
        if (tax.getId() != null) {
            if(em.contains(tax)){
                em.refresh(tax);
            }
            Tax mergedTax = em.merge(tax);
            em.flush();
            return mergedTax;
        } else {
            em.persist(tax);
            return tax;
View Full Code Here

Examples of org.hoteia.qalingo.core.domain.Tax

        return deliveryMethodService.saveOrUpdateDeliveryMethod(deliveryMethod);
    }
   
    public Tax createOrUpdateTax(Tax tax, final TaxForm taxForm) {
        if (tax == null) {
            tax = new Tax();
        }
        if (StringUtils.isNotEmpty(taxForm.getCode())) {
            tax.setCode(taxForm.getCode());
        }
        if (StringUtils.isNotEmpty(taxForm.getName())) {
View Full Code Here

Examples of org.hoteia.qalingo.core.domain.Tax

    public ModelAndView taxDetails(final HttpServletRequest request, final Model model) throws Exception {
        ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), BoUrls.TAX_DETAILS.getVelocityPage());
        final RequestData requestData = requestUtil.getRequestData(request);
       
        final String taxCode = request.getParameter(RequestConstants.REQUEST_PARAMETER_TAX_CODE);
        final Tax tax = taxService.getTaxByCode(taxCode);
       
        // SANITY CHECK
        if(tax != null){
            modelAndView.addObject(ModelConstants.TAX_VIEW_BEAN, backofficeViewBeanFactory.buildViewBeanTax(requestData, tax));
        } else {
            final String url = requestUtil.getLastRequestUrl(request);
            return new ModelAndView(new RedirectView(url));
        }

        model.addAttribute(ModelConstants.URL_BACK, backofficeUrlService.generateUrl(BoUrls.TAX_LIST, requestData));
       
        Object[] params = {tax.getName() + " (" + tax.getCode() + ")"};
        overrideDefaultSeoPageTitleAndMainContentTitle(request, modelAndView, BoUrls.TAX_DETAILS.getKey(), params);

        return modelAndView;
    }
View Full Code Here

Examples of org.hoteia.qalingo.core.domain.Tax

        final RequestData requestData = requestUtil.getRequestData(request);
       
        final String taxCode = request.getParameter(RequestConstants.REQUEST_PARAMETER_TAX_CODE);
        if(StringUtils.isNotEmpty(taxCode)){
            // EDIT MODE
            final Tax tax = taxService.getTaxByCode(taxCode);

            TaxViewBean taxViewBean = backofficeViewBeanFactory.buildViewBeanTax(requestData, tax);
            request.setAttribute(ModelConstants.TAX_VIEW_BEAN, taxViewBean);

            Object[] params = {tax.getName() + " (" + tax.getCode() + ")"};
            overrideDefaultSeoPageTitleAndMainContentTitle(request, modelAndView, BoUrls.TAX_EDIT.getKey(), params);

            model.addAttribute(ModelConstants.URL_BACK, backofficeUrlService.generateUrl(BoUrls.TAX_DETAILS, requestData, tax));
        } else {
            // ADD MODE
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.