NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

package com.highradius.training.action;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import com.google.gson.Gson;
import com.highradius.common.util.HRCLog;
import com.highradius.common.util.HRCLogFactory;
import com.highradius.training.invoices.manager.InvoiceManager;
import com.receivablesradius.deductions.action.BaseAction;
import com.receivablesradius.deductions.constants.JSONRowResult;
import com.receivablesradius.deductions.manager.impl.AdvanceSearchQueryHelperManagerImpl;

import bbsr.highradius.training.model.invoices.Account;
import bbsr.highradius.training.model.invoices.Customer;
import bbsr.highradius.training.model.invoices.InvoiceType;
import bbsr.highradius.training.model.invoices.PostingKey;

public class InvoiceAction extends BaseAction{

private static final HRCLog LOGGER = HRCLogFactory.getLog(InvoiceAction.class);

private InvoiceManager InvoiceManager;
private Integer pkInvoiceId;
private Account fkAccountId;
private String invoiceNumber;
private String companyCode;
private String fiscalYear;
private String itemNumber;
private InvoiceType fkInvoiceType;
private PostingKey fkPostingKey;
private Customer fkCustomerId;
private Double invoiceTotalAmount;
private Double invoiceDueAmount;
private Date invoiceCreatedDate;
private Date dueDate;
private Integer discount1Percentage;
private Integer discount2Percentage;
private Integer discount3Percentage;
private Character debitCreditIndicator;

private String query;

public InvoiceAction() {

}

public String getInvoice() {
LOGGER.debug("Inside getInvoice() called from InvoiceManager");
//LOGGER.debug("Searched Name :"+firstName+" Employee ID : "+employeeId);
AdvanceSearchQueryHelperManagerImpl advanceSearchQueryHelperManagerImpl = new AdvanceSearchQueryHelperManagerImpl();
String advanceSearchWhereQuery = advanceSearchQueryHelperManagerImpl.massageQuery(null,query);
Map<String, Object> InvoiceMap = new HashMap<>();
JSONRowResult result = new JSONRowResult();
try {
InvoiceMap = InvoiceManager.getInvoice(advanceSearchWhereQuery, getStartIndex(), getRowsToFetch());
//null check to avoid null pointer exception
if(InvoiceMap != null) {
result.results = InvoiceMap.get("count");
result.rows = InvoiceMap.get("rows");
}
}
catch (Exception e) {
LOGGER.error("Error inside getInvoice :",e);
return ERROR;
}
Gson gson = new Gson();
String jsonResult = gson.toJson(result);
setOutput(jsonResult);
return SUCCESS;
}

public Integer getPkInvoiceId() {
return pkInvoiceId;
}

public void setPkInvoiceId(Integer pkInvoiceId) {
this.pkInvoiceId = pkInvoiceId;
}

public Account getFkAccountId() {
return fkAccountId;
}

public void setFkAccountId(Account fkAccountId) {
this.fkAccountId = fkAccountId;
}

public String getInvoiceNumber() {
return invoiceNumber;
}

public void setInvoiceNumber(String invoiceNumber) {
this.invoiceNumber = invoiceNumber;
}

public String getCompanyCode() {
return companyCode;
}

public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}

public String getFiscalYear() {
return fiscalYear;
}

public void setFiscalYear(String fiscalYear) {
this.fiscalYear = fiscalYear;
}

public String getItemNumber() {
return itemNumber;
}

public void setItemNumber(String itemNumber) {
this.itemNumber = itemNumber;
}

public InvoiceType getFkInvoiceType() {
return fkInvoiceType;
}

public void setFkInvoiceType(InvoiceType fkInvoiceType) {
this.fkInvoiceType = fkInvoiceType;
}

public PostingKey getFkPostingKey() {
return fkPostingKey;
}

public void setFkPostingKey(PostingKey fkPostingKey) {
this.fkPostingKey = fkPostingKey;
}

public Customer getFkCustomerId() {
return fkCustomerId;
}

public void setFkCustomerId(Customer fkCustomerId) {
this.fkCustomerId = fkCustomerId;
}

public Double getInvoiceTotalAmount() {
return invoiceTotalAmount;
}

public void setInvoiceTotalAmount(Double invoiceTotalAmount) {
this.invoiceTotalAmount = invoiceTotalAmount;
}

public Double getInvoiceDueAmount() {
return invoiceDueAmount;
}

public void setInvoiceDueAmount(Double invoiceDueAmount) {
this.invoiceDueAmount = invoiceDueAmount;
}

public Date getInvoiceCreatedDate() {
return invoiceCreatedDate;
}

public void setInvoiceCreatedDate(Date invoiceCreatedDate) {
this.invoiceCreatedDate = invoiceCreatedDate;
}

public Date getDueDate() {
return dueDate;
}

public void setDueDate(Date dueDate) {
this.dueDate = dueDate;
}

public Integer getDiscount1Percentage() {
return discount1Percentage;
}

public void setDiscount1Percentage(Integer discount1Percentage) {
this.discount1Percentage = discount1Percentage;
}

public Integer getDiscount2Percentage() {
return discount2Percentage;
}

public void setDiscount2Percentage(Integer discount2Percentage) {
this.discount2Percentage = discount2Percentage;
}

public Integer getDiscount3Percentage() {
return discount3Percentage;
}

public void setDiscount3Percentage(Integer discount3Percentage) {
this.discount3Percentage = discount3Percentage;
}

public Character getDebitCreditIndicator() {
return debitCreditIndicator;
}

public void setDebitCreditIndicator(Character debitCreditIndicator) {
this.debitCreditIndicator = debitCreditIndicator;
}

public String getQuery() {
return query;
}

public void setQuery(String query) {
this.query = query;
}

public InvoiceManager getInvoiceManager() {
return InvoiceManager;
}

public void setInvoiceManager(InvoiceManager invoiceManager) {
InvoiceManager = invoiceManager;
}




}
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.