
org.beigesoft.acc.mdlp.SalRet Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of beige-acc Show documentation
Show all versions of beige-acc Show documentation
It consists of double entry accounting and trading (web-store) business logic.
It's based on previous beigesoft-accounting and beigesoft-webstore projects.
The newest version!
/*
BSD 2-Clause License
Copyright (c) 2019, Beigesoft™
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.beigesoft.acc.mdlp;
import java.util.List;
import java.math.BigDecimal;
import org.beigesoft.acc.mdl.EDocTy;
import org.beigesoft.acc.mdl.EDocDriTy;
import org.beigesoft.acc.mdlb.ADoc;
import org.beigesoft.acc.mdlb.IRet;
import org.beigesoft.acc.mdlb.IDcDri;
/**
* Model of sales return.
*
* @author Yury Demidenko
*/
public class SalRet extends ADoc implements IRet, IDcDri {
/**
* Invoice.
**/
private SalInv inv;
/**
* Subtotal.
**/
private BigDecimal subt = BigDecimal.ZERO;
/**
* Subtotal in foreign currency.
**/
private BigDecimal suFc = BigDecimal.ZERO;
/**
* Total taxes.
**/
private BigDecimal toTx = BigDecimal.ZERO;
/**
* Total taxes in foreign currency.
**/
private BigDecimal txFc = BigDecimal.ZERO;
/**
* Tax lines.
**/
private List txLns;
/**
* Goods lines.
**/
private List gdLns;
/**
* Constant of code type 9.
* @return 9
**/
@Override
public final Integer cnsTy() {
return 9;
}
/**
* Getter of EDocTy.
* @return EDocTy
**/
@Override
public final EDocTy getDocTy() {
return EDocTy.ITSRLN;
}
/**
* Getter for has draw items document type.
* @return has draw items document type
**/
@Override
public final EDocDriTy getDocDriTy() {
return EDocDriTy.COGSDRIT;
}
/**
* Getter for dbcr.
* @return DbCr
**/
@Override
public final DbCr getDbcr() {
if (this.inv == null) {
return null;
}
return this.inv.getDbcr();
}
/**
* Setter for dbcr.
* @param pDbcr reference
**/
@Override
public final void setDbcr(final DbCr pDbcr) {
throw new RuntimeException("Not allowed!");
}
/**
* Getter for cuFr.
* @return Curr
**/
@Override
public final Curr getCuFr() {
if (this.inv == null) {
return null;
}
return this.inv.getCuFr();
}
/**
* Setter for cuFr.
* @param pCuFr reference
**/
@Override
public final void setCuFr(final Curr pCuFr) {
throw new RuntimeException("Not allowed!");
}
/**
* Getter for exRt.
* @return BigDecimal
**/
@Override
public final BigDecimal getExRt() {
if (this.inv == null) {
return null;
}
return this.inv.getExRt();
}
/**
* Setter for exRt.
* @param pExRt reference
**/
@Override
public final void setExRt(final BigDecimal pExRt) {
throw new RuntimeException("Not allowed!");
}
/**
* Getter for subt.
* @return BigDecimal
**/
@Override
public final BigDecimal getSubt() {
return this.subt;
}
/**
* Setter for subt.
* @param pSubt reference
**/
@Override
public final void setSubt(final BigDecimal pSubt) {
this.subt = pSubt;
}
/**
* Getter for suFc.
* @return BigDecimal
**/
@Override
public final BigDecimal getSuFc() {
return this.suFc;
}
/**
* Setter for suFc.
* @param pSuFc reference
**/
@Override
public final void setSuFc(final BigDecimal pSuFc) {
this.suFc = pSuFc;
}
/**
* Getter for toTx.
* @return BigDecimal
**/
@Override
public final BigDecimal getToTx() {
return this.toTx;
}
/**
* Setter for toTx.
* @param pToTx reference
**/
@Override
public final void setToTx(final BigDecimal pToTx) {
this.toTx = pToTx;
}
/**
* Getter for txFc.
* @return BigDecimal
**/
@Override
public final BigDecimal getTxFc() {
if (this.inv == null) {
return null;
}
return this.txFc;
}
/**
* Setter for txFc.
* @param pTxFc reference
**/
@Override
public final void setTxFc(final BigDecimal pTxFc) {
this.txFc = pTxFc;
}
/**
* Getter for inTx.
* @return Boolean
**/
@Override
public final Boolean getInTx() {
if (this.inv == null) {
return null;
}
return this.inv.getInTx();
}
/**
* Setter for inTx.
* @param pInTx reference
**/
@Override
public final void setInTx(final Boolean pInTx) {
throw new RuntimeException("Not allowed!");
}
/**
* Getter for omTx.
* @return Boolean
**/
@Override
public final Boolean getOmTx() {
if (this.inv == null) {
return null;
}
return this.inv.getOmTx();
}
/**
* Setter for omTx.
* @param pOmTx reference
**/
@Override
public final void setOmTx(final Boolean pOmTx) {
throw new RuntimeException("Not allowed!");
}
/**
* Getter for inv.
* @return SalInv
**/
@Override
public final SalInv getInv() {
return this.inv;
}
/**
* Setter for inv.
* @param pInv reference
**/
@Override
public final void setInv(final SalInv pInv) {
this.inv = pInv;
}
//Simple getters and setters:
/**
* Getter for txLns.
* @return List
**/
public final List getTxLns() {
return this.txLns;
}
/**
* Setter for txLns.
* @param pTxLns reference
**/
public final void setTxLns(final List pTxLns) {
this.txLns = pTxLns;
}
/**
* Getter for gdLns.
* @return List
**/
public final List getGdLns() {
return this.gdLns;
}
/**
* Setter for gdLns.
* @param pGdLns reference
**/
public final void setGdLns(final List pGdLns) {
this.gdLns = pGdLns;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy