Examples of Invoice


Examples of com.zesped.model.Invoice

    return new RedirectResolution(CaptureInvoice.class);
  }
 
  public Resolution save() {
    Log.out.debug("Begin EditInvoice.save()");
    Invoice oInv = saveInvoice();
    Dms oDms;
    Resolution oRes = new RedirectResolution(ListNewInvoices.class);
    try {
      connect(getSessionAttribute("nickname"), getSessionAttribute("password"));
      oDms = getSession().getDms();
      SortableList<Document> oNext = oDms.query("(Invoice$is_processed='0') & (Invoice$recipient_taxpayer='"+getRecipientTaxPayer()+"')");
      if (!oNext.isEmpty()) {
        oRes = new RedirectResolution("/EditInvoice.action?a=0&id="+oNext.get(0).id());
        setParam("former_id", getId());
      }
      disconnect();
      if (oInv.hasMistakes()) {
        connect();
        User oMe = new User(getSession(), getSessionAttribute("user_docid"));
        User oTo = new User(getSession(), User.forUuid(oInv.getString("captured_by")));
        Messages.notify(getSession(), oMe.getFirstName()+" "+oMe.getLastName(),
                  oMe.getEmail(), oMe.getNickName(), oTo.getEmail(), oTo.getNickName(),
                  "Incidencia con la factura "+getId(), oInv.getComments(), getId());     
        disconnect();
      }
    } catch (Exception e) {
      Log.out.error("Invoice.save() "+e.getClass().getName()+" "+e.getMessage());
    } finally {
View Full Code Here

Examples of com.zesped.model.Invoice

  public Resolution reject() {
      Log.out.debug("Begin EditInvoice.reject()");
      setApproved(false);
      setProcessed(false);
      setMistakes(true);
      Invoice oInv = saveInvoice();
      Dms oDms;
      Resolution oRes = new RedirectResolution(ListPendingInvoices.class);
      try {
        connect();
        oDms = getSession().getDms();
        Log.out.debug("Dms.query((Invoice$is_processed='1') & (Invoice$is_approved='0') & (Invoice$recipient_taxpayer='"+getRecipientTaxPayer()+"'))");
        SortableList<Document> oNext = oDms.query("(Invoice$is_processed='1') & (Invoice$is_approved='0') & (Invoice$recipient_taxpayer='"+getRecipientTaxPayer()+"')");
        if (!oNext.isEmpty()) {
          oRes = new RedirectResolution("/EditInvoice.action?a=1&id="+oNext.get(0).id());
          setParam("former_id", getId());
        }
        User oMe = new User(getSession(), getSessionAttribute("user_docid"));
        User oTo = new User(getSession(), User.forUuid(oInv.getString("captured_by")));
        Messages.notify(getSession(), oMe.getFirstName()+" "+oMe.getLastName(),
                  oMe.getEmail(), oMe.getNickName(), oTo.getEmail(), oTo.getNickName(),
                  "Incidencia con la factura "+getId(), oInv.getComments(), getId());
        disconnect();
      } catch (Exception e) {
        Log.out.error("Invoice.reject()"+e.getClass().getName()+" "+e.getMessage());
      } finally {
        close();
View Full Code Here

Examples of com.zesped.model.Invoice

    final String sDocs = getParam("docs","");
    final String sCmmt = getParam("comments");
    if (sDocs.length()>0) {
      String[] aDocs = sDocs.split(",");
      try {
        Invoice oInv;
        connect(getSessionAttribute("nickname"), getSessionAttribute("password"));
        Dms oDms = getSession().getDms();
        for (int d=0; d<aDocs.length; d++) {
          try {
            oInv = new Invoice(oDms, aDocs[d]);
            oInv.reject(getSession(), getSessionAttribute("user_uuid"), sCmmt);
              addDataLine("id",oInv.id());
          } catch (ElementNotFoundException enfe) {
            addError(new SimpleError("Invoice not found "+aDocs[d]));
          }
        }
        disconnect();
View Full Code Here

Examples of com.zesped.model.Invoice

  public InvoiceThumbnail getThumbnail() {
    Log.out.debug("InvoiceThumbnail getThumbnail("+getId()+")");
    if (thumbnail==null) {
      try {
        connect(getSessionAttribute("nickname"), getSessionAttribute("password"));
          Invoice oInv = new Invoice(getSession().getDms(), getId());
          thumbnail = oInv.thumbnail(getSession());
        } catch (Exception xcpt) {
            Log.out.error(xcpt.getMessage(), xcpt);
        } finally {
          close();
        }     
View Full Code Here

Examples of de.xanders.data.customer.dao.Invoice

    /**
     * @see InvoiceService#getInvoiceById(java.lang.Long)
     */
    protected InvoiceVO handleGetInvoiceById(java.lang.Long invoiceId)
        throws java.lang.Exception {
      Invoice invoice = this.getInvoiceDao().load(invoiceId);
      return this.getInvoiceDao().toInvoiceVO(invoice);
    }
View Full Code Here

Examples of example.invoicing.Invoice

  @ReplyActivity(receiveName="RecvPORequest")
  public void SendInvoice(){   
  }
 
  public Invoice sendPurchaseOrder(){
    return new Invoice();
  }
View Full Code Here

Examples of io.fabric8.process.spring.boot.data.domain.Invoice

    @Before
    public void before() throws MalformedURLException {

        restRepository = forRegistrySymbol(processRegistry, "invoicing", Invoice.class);

        invoice = new Invoice().invoiceId(randomUUID().toString());
        invoice = restRepository.save(invoice);
    }
View Full Code Here

Examples of io.fabric8.process.spring.boot.itests.service.invoicing.domain.Invoice

    }

    @Test
    public void shouldCreateInvoice() {
        // Given
        Invoice invoice = new Invoice().invoiceId("INV-001");

        // When
        URI invoiceUri = restTemplate.postForLocation("http://localhost:8080/invoice", invoice);
        Invoice receivedInvoice = restTemplate.getForObject(invoiceUri, Invoice.class);

        // Then
        assertEquals(invoice.getInvoiceId(), receivedInvoice.getInvoiceId());
    }
View Full Code Here

Examples of no.sws.invoice.Invoice

    private static List<Invoice> generateDemoInvoice() throws Exception {

        List<Invoice> result = new ArrayList<Invoice>();

        // create a simple demo invoice (use most of the default values)
        Invoice demo = InvoiceFactory.getInstance().getInvoice();

        // used for identifying this invoice in the response (optional)
        demo.setClientId("myUniqueId");

        // set the recipient of the invoice
        demo.setRecipient(generateDemoRecipient());

        // add an invoice line
        demo.addInvoiceLine(new BigDecimal("1.00"), "Fakturalinje #1", new BigDecimal("100.00"));

        // send the invoice by email with a copy to my accountant
        Shipment shipment = ShipmentFactory.getInstance(ShipmentType.email);
        shipment.addEmailAddress("kari@nordmann.no");
        shipment.addCopyAddress("kopi@regnskap.no");

        demo.setShipment(shipment);

        // add the demo invoice to the list to return. You can add as many
        // invoices you like, the only limit is the file size of the generated
        // xml that can't exceed 2Mb
        result.add(demo);
View Full Code Here

Examples of org.bigk.invoices.model.Invoice

  public Invoice prepareNewInvoice() throws ServiceException {
    if (logger.isDebugEnabled()) {
      logger.debug("prepareNewInvoice() - start");
    }
   
    Invoice invoice = null;
    if (this.invoiceTemplate != null) {
      try {
        invoice = invoiceTemplate.clone();
      } catch (CloneNotSupportedException e) {
        logger.warn("prepareNewInvoice()", e);
      }
    }
   
    if (invoice == null) {
      invoice = new Invoice();
    }

    Calendar nowDay = Calendar.getInstance();
    nowDay.set(Calendar.HOUR, 0);
    nowDay.set(Calendar.MINUTE, 0);
    nowDay.set(Calendar.SECOND, 0);
    nowDay.set(Calendar.MILLISECOND, 0);
   
    String curYear = Integer.toString(nowDay.get(Calendar.YEAR));
    String curMonth = Integer.toString(nowDay.get(Calendar.MONTH) + 1);
    curMonth = StringUtils.right("0" + curMonth, 2);
   
    curYear += "/" + curMonth;
    invoice.setYear(curYear);
   
    int maxInvoiceNumber = this.getMaxInvoiceNumber(curYear);
    maxInvoiceNumber++;
   
    Long number = new Long(maxInvoiceNumber);
    invoice.setNumber(number);
    invoice.setDocumentDate(nowDay.getTime());
    invoice.setSoldDate(nowDay.getTime());
   
    PaymentKind pk = null;
    if (invoice.getPaymentKindId() != null) {
      pk = paymentKindsService.getPaymentKind(invoice.getPaymentKindId());
    }
   
    Date paymentDate = null;
    if (pk != null) {
      invoice.setPaymentKind(pk);
      paymentDate = paymentKindsService.calculatePaymentDate(nowDay.getTime(), pk.getId());
      invoice.setPaymentDate(paymentDate);
    }
   
    recalculateInvoice(invoice);
    hrInvoiceNumberService.updateHRInvoiceNumber(invoice);
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.