-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
370 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package helpers.api.dolibarr.model; | ||
|
||
/** | ||
* @author jtremeaux | ||
*/ | ||
public class PaymentTerm { | ||
public static final Integer AFTER_30_DAYS = 2; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package helpers.api.dolibarr.model; | ||
|
||
/** | ||
* @author jtremeaux | ||
*/ | ||
public class ProductType { | ||
public static final Integer SERVICE = 1; | ||
} |
9 changes: 9 additions & 0 deletions
9
app/helpers/api/dolibarr/model/clientInvoice/ClientInvoiceValidateModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package helpers.api.dolibarr.model.clientInvoice; | ||
|
||
/** | ||
* @author jtremeaux | ||
*/ | ||
public class ClientInvoiceValidateModel { | ||
public Integer idwarehouse; | ||
public Integer notrigger; | ||
} |
119 changes: 119 additions & 0 deletions
119
app/helpers/api/dolibarr/model/supplierInvoice/SupplierInvoiceLineModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
package helpers.api.dolibarr.model.supplierInvoice; | ||
|
||
import java.math.BigDecimal; | ||
|
||
/** | ||
* @author jtremeaux | ||
*/ | ||
public class SupplierInvoiceLineModel { | ||
public String ref; | ||
public String product_ref; | ||
public String ref_supplier; | ||
public String product_desc; | ||
public BigDecimal pu_ht; | ||
public BigDecimal subprice; | ||
public BigDecimal pu_ttc; | ||
public Long fk_facture_fourn; | ||
public String label; | ||
public String description; | ||
public String date_start; | ||
public String date_end; | ||
public String situation_percent; | ||
public Long fk_prev_id; | ||
public String vat_src_code; | ||
public BigDecimal tva_tx; | ||
public BigDecimal localtax1_tx; | ||
public BigDecimal localtax2_tx; | ||
public BigDecimal qty; | ||
public BigDecimal remise_percent; | ||
public BigDecimal total_ht; | ||
public BigDecimal total_ttc; | ||
public BigDecimal total_tva; | ||
public BigDecimal total_localtax1; | ||
public BigDecimal total_localtax2; | ||
public Long fk_product; | ||
public Integer product_type; | ||
public String product_label; | ||
public String info_bits; | ||
public Long fk_remise_except; | ||
public Long fk_parent_line; | ||
public String special_code; | ||
public String rang; | ||
public String localtax1_type; | ||
public Long localtax2_type; | ||
public BigDecimal multicurrency_subprice; | ||
public BigDecimal multicurrency_total_ht; | ||
public BigDecimal multicurrency_total_tva; | ||
public BigDecimal multicurrency_total_ttc; | ||
public Long id; | ||
public Long fk_unit; | ||
public String date_debut_prevue; | ||
public String date_debut_reel; | ||
public String date_fin_prevue; | ||
public String date_fin_reel; | ||
public String weight; | ||
public String weight_units; | ||
public String width; | ||
public String width_units; | ||
public String height; | ||
public String height_units; | ||
public String length; | ||
public String length_units; | ||
public String surface; | ||
public String surface_units; | ||
public String volume; | ||
public String volume_units; | ||
public String multilangs; | ||
public String desc; | ||
public String product; | ||
public String product_barcode; | ||
public Long fk_product_type; | ||
public String duree; | ||
public String entity; | ||
public String import_key; | ||
public String contacts_ids; | ||
public String linked_objects; | ||
public String linkedObjectsIds; | ||
public String canvas; | ||
public String origin; | ||
public String origin_id; | ||
public String ref_ext; | ||
public String statut; | ||
public String status; | ||
public String state_id; | ||
public String region_id; | ||
public String demand_reason_id; | ||
public String transport_mode_id; | ||
public String last_main_doc; | ||
public Long fk_bank; | ||
public Long fk_account; | ||
public String lines; | ||
public String date_creation; | ||
public String date_validation; | ||
public String date_modification; | ||
public String date_cloture; | ||
public String user_author; | ||
public String user_creation; | ||
public String user_creation_id; | ||
public String user_valid; | ||
public String user_validation; | ||
public String user_validation_id; | ||
public String user_closing_id; | ||
public String user_modification; | ||
public String user_modification_id; | ||
public String specimen; | ||
public String libelle; | ||
public String code_ventilation; | ||
public Long fk_accounting_account; | ||
|
||
public SupplierInvoiceLineModel() { | ||
} | ||
|
||
public SupplierInvoiceLineModel(Integer product_type, BigDecimal pu_ht, BigDecimal tva_tx, BigDecimal qty, String description) { | ||
this.product_type = product_type; | ||
this.pu_ht = pu_ht; | ||
this.tva_tx = tva_tx; | ||
this.qty = qty; | ||
this.description = description; | ||
} | ||
} |
145 changes: 145 additions & 0 deletions
145
app/helpers/api/dolibarr/model/supplierInvoice/SupplierInvoiceModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
package helpers.api.dolibarr.model.supplierInvoice; | ||
|
||
import org.joda.time.DateTime; | ||
import org.joda.time.DateTimeZone; | ||
import org.joda.time.format.DateTimeFormat; | ||
import org.joda.time.format.DateTimeFormatter; | ||
|
||
import java.math.BigDecimal; | ||
import java.util.ArrayList; | ||
import java.util.Date; | ||
import java.util.List; | ||
|
||
/** | ||
* @author jtremeaux | ||
*/ | ||
public class SupplierInvoiceModel { | ||
public String ref; | ||
public String ref_supplier; | ||
public String label; | ||
public Integer socid; | ||
public Long type; | ||
public Long statut; | ||
public Long status; | ||
public String close_code; | ||
public String close_note; | ||
public String paye; | ||
public String datec; | ||
public String tms; | ||
public String date; | ||
public String date_echeance; | ||
public String amount; | ||
public String remise; | ||
public String tva; | ||
public String localtax1; | ||
public String localtax2; | ||
public BigDecimal total_ht; | ||
public BigDecimal total_tva; | ||
public String total_localtax1; | ||
public String total_localtax2; | ||
public BigDecimal total_ttc; | ||
public String note_private; | ||
public String note_public; | ||
public String propalid; | ||
public Integer cond_reglement_id; | ||
public String cond_reglement_code; | ||
public String cond_reglement_label; | ||
public String cond_reglement_doc; | ||
public Integer fk_account; | ||
public Integer mode_reglement_id; | ||
public String mode_reglement_code; | ||
public Long transport_mode_id; | ||
// "extraparams": [], | ||
public List<SupplierInvoiceLineModel> lines = new ArrayList<>(); | ||
public String fournisseur; | ||
public String fk_multicurrency; | ||
public String multicurrency_code; | ||
public BigDecimal multicurrency_tx; | ||
public BigDecimal multicurrency_total_ht; | ||
public BigDecimal multicurrency_total_tva; | ||
public BigDecimal multicurrency_total_ttc; | ||
public Long fk_facture_source; | ||
public String fac_rec; | ||
public String totalpaid; | ||
public String totaldeposits; | ||
public String totalcreditnotes; | ||
public String sumpayed; | ||
public String sumpayed_multicurrency; | ||
public String sumdeposit; | ||
public String sumdeposit_multicurrency; | ||
public String sumcreditnote; | ||
public String sumcreditnote_multicurrency; | ||
public String remaintopay; | ||
public Long id; | ||
public Long entity; | ||
public String import_key; | ||
// public String array_options": [], | ||
public String array_languages; | ||
public String contacts_ids; | ||
public String linked_objects; | ||
public String linkedObjectsIds; | ||
public String canvas; | ||
public String fk_project; | ||
public String contact_id; | ||
public String user; | ||
public String origin; | ||
public String origin_id; | ||
public String ref_ext; | ||
public String country_id; | ||
public String country_code; | ||
public String state_id; | ||
public String region_id; | ||
public String demand_reason_id; | ||
public String shipping_method_id; | ||
public String model_pdf; | ||
public String last_main_doc; | ||
public String fk_bank; | ||
public String name; | ||
public String lastname; | ||
public String firstname; | ||
public String civility_id; | ||
public String date_creation; | ||
public String date_validation; | ||
public String date_modification; | ||
public String date_cloture; | ||
public String user_author; | ||
public String user_creation; | ||
public String user_creation_id; | ||
public String user_valid; | ||
public String user_validation; | ||
public String user_validation_id; | ||
public String user_closing_id; | ||
public String user_modification; | ||
public String user_modification_id; | ||
public Long specimen; | ||
public Long fk_incoterms; | ||
public String label_incoterms; | ||
public String location_incoterms; | ||
public String fk_soc; | ||
public Long datep; | ||
public String libelle; | ||
public Long paid; | ||
public Long fk_statut; | ||
public Long fk_user_author; | ||
public Long fk_user_valid; | ||
public String fk_fac_rec_source; | ||
public String socnom; | ||
|
||
public static final String DATE_SHORT_FORMAT = "yyyy-MM-dd"; | ||
|
||
public static final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormat.forPattern(DATE_SHORT_FORMAT); | ||
|
||
public SupplierInvoiceModel() { | ||
} | ||
|
||
public SupplierInvoiceModel(String ref_supplier, Integer socid, Date date, Date dateEcheance, Integer cond_reglement_id, Integer mode_reglement_id, Integer fk_account) { | ||
this.ref = "auto"; | ||
this.ref_supplier = ref_supplier; | ||
this.socid = socid; | ||
this.date = DATE_TIME_FORMATTER.print(new DateTime(date).withZone(DateTimeZone.UTC)); | ||
this.date_echeance = DATE_TIME_FORMATTER.print(new DateTime(dateEcheance).withZone(DateTimeZone.UTC)); | ||
this.cond_reglement_id = cond_reglement_id; | ||
this.mode_reglement_id = mode_reglement_id; | ||
this.fk_account = fk_account; | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
app/helpers/api/dolibarr/model/supplierInvoice/SupplierInvoiceValidateModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package helpers.api.dolibarr.model.supplierInvoice; | ||
|
||
/** | ||
* @author jtremeaux | ||
*/ | ||
public class SupplierInvoiceValidateModel { | ||
public Integer idwarehouse; | ||
public Integer notrigger; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.