| | |
| | | -- |
| | | -- table: bank_account |
| | | -- |
| | | INSERT INTO bank_account (bp_id, autodebit_ga, autodebit_ar, autodebit_op, |
| | | bank_customer, bank_account, bank_code, bank_name, mandat_ref, mandat_signed, mandat_since) |
| | | INSERT INTO bank_account (bp_id, bank_customer, bank_account, bank_code, bank_name, mandat_ref, mandat_signed, mandat_since) |
| | | SELECT bp_id, false, false, false, '', '', '', '', member_id, current_date, current_date |
| | | FROM business_partner WHERE member_id=10000; |
| | | |
| | |
| | | CREATE TABLE bank_account ( |
| | | bank_account_id integer DEFAULT nextval(('"bank_account_bank_account_id_seq"'::text)::regclass) NOT NULL, |
| | | bp_id integer NOT NULL, |
| | | autodebit_ga boolean NOT NULL, |
| | | autodebit_ar boolean NOT NULL, |
| | | autodebit_op boolean NOT NULL, |
| | | bank_customer character varying(50), |
| | | bank_account character varying(10), |
| | | bank_code character varying(8), |
| | |
| | | @OneToOne(fetch = EAGER) |
| | | private Customer customer; |
| | | |
| | | @Column(name = "autodebit_ga", columnDefinition = "boolean", nullable = false) |
| | | private Boolean autoDebitGA = Boolean.FALSE; |
| | | |
| | | @Column(name = "autodebit_ar", columnDefinition = "boolean", nullable = false) |
| | | private Boolean autoDebitAR = Boolean.FALSE; |
| | | |
| | | @Column(name = "autodebit_op", columnDefinition = "boolean", nullable = false) |
| | | private Boolean autoDebitOP = Boolean.FALSE; |
| | | |
| | | @Column(name = "bank_customer", columnDefinition = "character varying(50)") |
| | | private String bankCustomer; |
| | | |
| | |
| | | |
| | | public void setCustomer(Customer customer) { |
| | | this.customer = customer; |
| | | } |
| | | |
| | | public Boolean isAutoDebitGA() { |
| | | return autoDebitGA; |
| | | } |
| | | |
| | | public Boolean getAutoDebitGA() { |
| | | return autoDebitGA; |
| | | } |
| | | |
| | | public void setAutoDebitGA(Boolean autoDebitGA) { |
| | | this.autoDebitGA = autoDebitGA; |
| | | } |
| | | |
| | | public Boolean isAutoDebitAR() { |
| | | return autoDebitAR; |
| | | } |
| | | |
| | | public Boolean getAutoDebitAR() { |
| | | return autoDebitAR; |
| | | } |
| | | |
| | | public void setAutoDebitAR(Boolean autoDebitAR) { |
| | | this.autoDebitAR = autoDebitAR; |
| | | } |
| | | |
| | | public Boolean isAutoDebitOP() { |
| | | return autoDebitOP; |
| | | } |
| | | |
| | | public Boolean getAutoDebitOP() { |
| | | return autoDebitOP; |
| | | } |
| | | |
| | | public void setAutoDebitOP(Boolean autoDebitOP) { |
| | | this.autoDebitOP = autoDebitOP; |
| | | } |
| | | |
| | | public String getBankCustomer() { |
| | |
| | | resultMap.put("uidvat", cust.getUidVAT()); |
| | | // BankAccount bank = cust.getBankAccount(); |
| | | // if (bank != null) { |
| | | // resultMap.put("autodebit_ga", bank.getAutoDebitGA() != null && bank.getAutoDebitGA() ? "Yes" : "No"); |
| | | // resultMap.put("autodebit_ar", bank.getAutoDebitAR() != null && bank.getAutoDebitAR() ? "Yes" : "No"); |
| | | // resultMap.put("autodebit_op", bank.getAutoDebitOP() != null && bank.getAutoDebitOP() ? "Yes" : "No"); |
| | | // resultMap.put("bank_customer", bank.getBankCustomer()); |
| | | // resultMap.put("bank_iban", bank.getBankIBAN()); |
| | | // resultMap.put("bank_bic", bank.getBankBIC()); |
| | |
| | | // bank.setCustomer(cust); |
| | | // cust.setBankAccount(bank); |
| | | // bank.setMandatRef(memberNo); |
| | | // } |
| | | // String autoDebitGA = (String) setParams.get("autodebit_ga"); |
| | | // if (assertNotNull(autoDebitGA)) { |
| | | // autoDebitGA = autoDebitGA.toUpperCase(); |
| | | // bank.setAutoDebitGA(new Boolean(autoDebitGA.startsWith("T") || autoDebitGA.startsWith("Y"))); |
| | | // } |
| | | // String autoDebitAR = (String) setParams.get("autodebit_ar"); |
| | | // if (assertNotNull(autoDebitAR)) { |
| | | // autoDebitAR = autoDebitAR.toUpperCase(); |
| | | // bank.setAutoDebitAR(new Boolean(autoDebitAR.startsWith("T") || autoDebitAR.startsWith("Y"))); |
| | | // } |
| | | // String autoDebitOP = (String) setParams.get("autodebit_op"); |
| | | // if (assertNotNull(autoDebitOP)) { |
| | | // autoDebitOP = autoDebitOP.toUpperCase(); |
| | | // bank.setAutoDebitOP(new Boolean(autoDebitOP.startsWith("T") || autoDebitOP.startsWith("Y"))); |
| | | // } |
| | | // String bankCustomer = (String) setParams.get("bank_customer"); |
| | | // if (assertNotNull(bankCustomer)) { |