updating mpgs related changes
This commit is contained in:
@@ -0,0 +1,107 @@
|
||||
package zw.qantra.tm.domain.dtos;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ErpNextSalesInvoiceDto {
|
||||
|
||||
@JsonProperty("doctype")
|
||||
private String doctype = "Sales Invoice";
|
||||
|
||||
@JsonProperty("company")
|
||||
private String company;
|
||||
|
||||
@JsonProperty("customer")
|
||||
private String customer;
|
||||
|
||||
@JsonProperty("posting_date")
|
||||
private String postingDate;
|
||||
|
||||
@JsonProperty("due_date")
|
||||
private String dueDate;
|
||||
|
||||
@JsonProperty("reference_no")
|
||||
private String referenceNo;
|
||||
|
||||
@JsonProperty("remarks")
|
||||
private String remarks;
|
||||
|
||||
@JsonProperty("currency")
|
||||
private String currency;
|
||||
|
||||
@JsonProperty("conversion_rate")
|
||||
private Double conversionRate = 1.0;
|
||||
|
||||
@JsonProperty("items")
|
||||
private List<ErpNextInvoiceItemDto> items;
|
||||
|
||||
@JsonProperty("taxes")
|
||||
private List<ErpNextTaxDto> taxes;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class ErpNextInvoiceItemDto {
|
||||
@JsonProperty("doctype")
|
||||
private String doctype = "Sales Invoice Item";
|
||||
|
||||
@JsonProperty("item_code")
|
||||
private String itemCode;
|
||||
|
||||
@JsonProperty("item_name")
|
||||
private String itemName;
|
||||
|
||||
@JsonProperty("description")
|
||||
private String description;
|
||||
|
||||
@JsonProperty("qty")
|
||||
private Double qty = 1.0;
|
||||
|
||||
@JsonProperty("rate")
|
||||
private Double rate;
|
||||
|
||||
@JsonProperty("amount")
|
||||
private Double amount;
|
||||
|
||||
@JsonProperty("income_account")
|
||||
private String incomeAccount;
|
||||
|
||||
@JsonProperty("cost_center")
|
||||
private String costCenter;
|
||||
}
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class ErpNextTaxDto {
|
||||
@JsonProperty("doctype")
|
||||
private String doctype = "Sales Taxes and Charges";
|
||||
|
||||
@JsonProperty("charge_type")
|
||||
private String chargeType = "On Net Total";
|
||||
|
||||
@JsonProperty("account_head")
|
||||
private String accountHead;
|
||||
|
||||
@JsonProperty("description")
|
||||
private String description;
|
||||
|
||||
@JsonProperty("rate")
|
||||
private Double rate;
|
||||
|
||||
@JsonProperty("tax_amount")
|
||||
private Double taxAmount;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user