本文整理汇总了Java中com.openbravo.pos.util.RoundUtils类的典型用法代码示例。如果您正苦于以下问题:Java RoundUtils类的具体用法?Java RoundUtils怎么用?Java RoundUtils使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RoundUtils类属于com.openbravo.pos.util包,在下文中一共展示了RoundUtils类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: printState
import com.openbravo.pos.util.RoundUtils; //导入依赖的package包/类
private void printState() {
Double value = m_jTendered.getDoubleValue();
if (value == null) {
m_dTicket = 0.0;
} else {
m_dTicket = value;
}
m_jMoneyEuros.setText(Formats.CURRENCY.formatValue(new Double(m_dTicket)));
int iCompare = RoundUtils.compare(m_dTicket, m_dTotal);
// it is allowed to pay more
m_notifier.setStatus(m_dTicket > 0.0, iCompare >= 0);
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:17,代码来源:JPaymentPaper.java
示例2: printState
import com.openbravo.pos.util.RoundUtils; //导入依赖的package包/类
private void printState() {
Double value = m_jTendered.getDoubleValue();
if (value == null) {
m_dPaid = m_dTotal;
} else {
m_dPaid = value;
}
m_jMoneyEuros.setText(Formats.CURRENCY.formatValue(new Double(m_dPaid)));
int iCompare = RoundUtils.compare(m_dPaid, m_dTotal);
// if iCompare > 0 then the payment is not valid
m_notifier.setStatus(m_dPaid > 0.0 && iCompare <= 0, iCompare == 0);
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:17,代码来源:JPaymentCheque.java
示例3: printState
import com.openbravo.pos.util.RoundUtils; //导入依赖的package包/类
private void printState() {
Double value = m_jTendered.getDoubleValue();
if (value == null || value == 0.0) {
m_dPaid = m_dTotal;
} else {
m_dPaid = value;
}
int iCompare = RoundUtils.compare(m_dPaid, m_dTotal);
m_jMoneyEuros.setText(Formats.CURRENCY.formatValue(new Double(m_dPaid)));
m_jChangeEuros.setText(iCompare > 0
? Formats.CURRENCY.formatValue(new Double(m_dPaid - m_dTotal))
: null);
m_notifier.setStatus(m_dPaid > 0.0, iCompare >= 0);
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:19,代码来源:JPaymentCashPos.java
示例4: updateCurDebt
import com.openbravo.pos.util.RoundUtils; //导入依赖的package包/类
public void updateCurDebt(Double amount, Date d) {
curdebt = curdebt == null ? amount : curdebt + amount;
if (RoundUtils.compare(curdebt, 0.0) > 0) {
if (curdate == null) {
// new date
curdate = d;
}
} else if (RoundUtils.compare(curdebt, 0.0) == 0) {
curdebt = null;
curdate = null;
} else { // < 0
curdate = null;
}
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:17,代码来源:CustomerInfoExt.java
示例5: printState
import com.openbravo.pos.util.RoundUtils; //导入依赖的package包/类
private void printState() {
Double value = m_jTendered.getDoubleValue();
if (value == null || value == 0.0) {
m_dPaid = m_dTotal;
} else {
m_dPaid = value;
}
int iCompare = RoundUtils.compare(m_dPaid, m_dTotal);
m_jMoneyEuros.setText(Formats.CURRENCY.formatValue(m_dPaid));
m_jChangeEuros.setText(iCompare > 0
? Formats.CURRENCY.formatValue(m_dPaid - m_dTotal)
: null);
m_notifier.setStatus(m_dPaid > 0.0, iCompare >= 0);
}
开发者ID:gnoopy,项目名称:wifepos,代码行数:20,代码来源:JPaymentCashPos.java
示例6: updateCurDebt
import com.openbravo.pos.util.RoundUtils; //导入依赖的package包/类
/**
*
* @param amount
* @param d
*/
public void updateCurDebt(Double amount, Date d) {
curdebt = curdebt == null ? amount : curdebt + amount;
// JG Aug 2014
curdate = (new Date());
if (RoundUtils.compare(curdebt, 0.0) > 0) {
if (curdate == null) {
// new date
curdate = d;
}
} else if (RoundUtils.compare(curdebt, 0.0) == 0) {
curdebt = null;
curdate = null;
} else { // < 0
curdate = null;
}
}
开发者ID:gnoopy,项目名称:wifepos,代码行数:25,代码来源:CustomerInfoExt.java
示例7: LineDiscountPercent
import com.openbravo.pos.util.RoundUtils; //导入依赖的package包/类
public TicketLineInfo LineDiscountPercent(TicketLineInfo TicketLine, Double dDiscount) {
double linediscount = TicketLine.getDiscountRate();
double lineprice = TicketLine.getPriceTax();
double linenodisount = TicketLine.getPriceTaxNoDiscount();
if (linediscount == 0.0 || linediscount != dDiscount) {
if (linediscount != 0.0) {
TicketLine.setPriceTax(RoundUtils.getValue(linenodisount - linenodisount * dDiscount));
} else {
TicketLine.setPriceTax(RoundUtils.getValue(lineprice - lineprice * dDiscount));
}
TicketLine.setProperty("discountrate", Double.toString(dDiscount));
}
return TicketLine;
}
开发者ID:nordpos,项目名称:nordpos,代码行数:18,代码来源:DiscountPercent.java
示例8: executePayment
import com.openbravo.pos.util.RoundUtils; //导入依赖的package包/类
@Override
public PaymentInfo executePayment() {
try {
customerext = dlSales.loadCustomerExt(customerext.getId());
} catch (BasicException ex) {
return null;
}
if (RoundUtils.compare(RoundUtils.getValue(customerext.getCurdebt()) + m_dPaid, RoundUtils.getValue(customerext.getMaxdebt())) >= 0) {
printState();
return null;
} else {
return new PaymentInfoTicket(m_dPaid, "debt");
}
}
开发者ID:nordpos,项目名称:nordpos,代码行数:17,代码来源:JPaymentDebt.java
示例9: printState
import com.openbravo.pos.util.RoundUtils; //导入依赖的package包/类
private void printState() {
Double value = m_jTendered.getDoubleValue();
if (value == null || value == 0.0) {
m_dPaid = m_dTotal;
} else {
m_dPaid = value;
}
int iCompare = RoundUtils.compare(m_dPaid, m_dTotal);
m_jMoneyEuros.setText(Formats.CURRENCY.formatValue(m_dPaid));
m_jChangeEuros.setText(iCompare > 0
? Formats.CURRENCY.formatValue(m_dPaid - m_dTotal)
: "");
m_notifier.setStatus(m_dPaid > 0.0, iCompare >= 0);
}
开发者ID:nordpos,项目名称:nordpos,代码行数:19,代码来源:JPaymentCashPos.java
示例10: printState
import com.openbravo.pos.util.RoundUtils; //导入依赖的package包/类
private void printState() {
Double value = m_jTendered.getDoubleValue();
if (value == null) {
m_dTicket = 0.0;
} else {
m_dTicket = value;
}
m_jMoneyEuros.setText(Formats.CURRENCY.formatValue(new Double(m_dTicket)));
int iCompare = RoundUtils.compare(m_dTicket, m_dTotal);
// it is allowed to pay more
m_notifier.setStatus(m_dTicket > 0.0, iCompare >= 0, true);
}
开发者ID:ZarGate,项目名称:OpenbravoPOS,代码行数:17,代码来源:JPaymentPaper.java
示例11: printState
import com.openbravo.pos.util.RoundUtils; //导入依赖的package包/类
private void printState() {
Double value = m_jTendered.getDoubleValue();
if (value == null) {
m_dPaid = m_dTotal;
} else {
m_dPaid = value;
}
m_jMoneyEuros.setText(Formats.CURRENCY.formatValue(new Double(m_dPaid)));
int iCompare = RoundUtils.compare(m_dPaid, m_dTotal);
// if iCompare > 0 then the payment is not valid
m_notifier.setStatus(m_dPaid > 0.0 && iCompare <= 0, iCompare == 0, true);
}
开发者ID:ZarGate,项目名称:OpenbravoPOS,代码行数:17,代码来源:JPaymentCheque.java
示例12: printState
import com.openbravo.pos.util.RoundUtils; //导入依赖的package包/类
private void printState() {
Double value = m_jTendered.getDoubleValue();
if (value == null || value == 0.0) {
m_dPaid = m_dTotal;
} else {
m_dPaid = value;
}
addToTempString(value);
int iCompare = RoundUtils.compare(m_dPaid, m_dTotal);
m_jMoneyEuros.setText(Formats.CURRENCY.formatValue(new Double(m_dPaid)));
m_jChangeEuros.setText(iCompare > 0
? Formats.CURRENCY.formatValue(new Double(m_dPaid - m_dTotal))
: null);
m_notifier.setStatus(m_dPaid > 0.0, iCompare >= 0, true);
}
开发者ID:ZarGate,项目名称:OpenbravoPOS,代码行数:21,代码来源:JPaymentCashPos.java
示例13: activate
import com.openbravo.pos.util.RoundUtils; //导入依赖的package包/类
public void activate(CustomerInfoExt customerext, double dTotal, String transID) {
this.customerext = customerext;
m_dTotal = dTotal;
m_jTendered.reset();
//
if (customerext == null) {
m_jName.setText(null);
m_jNotes.setText(null);
txtMaxdebt.setText(null);
txtCurdate.setText(null);
txtCurdebt.setText(null);
m_jKeys.setEnabled(false);
m_jTendered.setEnabled(false);
} else {
m_jName.setText(customerext.getName());
m_jNotes.setText(customerext.getNotes());
txtMaxdebt.setText(Formats.CURRENCY.formatValue(RoundUtils.getValue(customerext.getMaxdebt())));
txtCurdate.setText(Formats.DATE.formatValue(customerext.getCurdate()));
txtCurdebt.setText(Formats.CURRENCY.formatValue(RoundUtils.getValue(customerext.getCurdebt())));
if (RoundUtils.compare(RoundUtils.getValue(customerext.getCurdebt()), RoundUtils.getValue(customerext.getMaxdebt())) >= 0) {
m_jKeys.setEnabled(false);
m_jTendered.setEnabled(false);
} else {
m_jKeys.setEnabled(true);
m_jTendered.setEnabled(true);
m_jTendered.activate();
}
}
printState();
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:40,代码来源:JPaymentDebt.java
示例14: printState
import com.openbravo.pos.util.RoundUtils; //导入依赖的package包/类
private void printState() {
if (customerext == null) {
m_jMoneyEuros.setText(null);
jlblMessage.setText(AppLocal.getIntString("message.nocustomernodebt"));
notifier.setStatus(false, false);
} else {
Double value = m_jTendered.getDoubleValue();
if (value == null || value == 0.0) {
m_dPaid = m_dTotal;
} else {
m_dPaid = value;
}
m_jMoneyEuros.setText(Formats.CURRENCY.formatValue(new Double(m_dPaid)));
if (RoundUtils.compare(RoundUtils.getValue(customerext.getCurdebt()) + m_dPaid, RoundUtils.getValue(customerext.getMaxdebt())) >= 0) {
// maximum debt exceded
jlblMessage.setText(AppLocal.getIntString("message.customerdebtexceded"));
notifier.setStatus(false, false);
} else {
jlblMessage.setText(null);
int iCompare = RoundUtils.compare(m_dPaid, m_dTotal);
// if iCompare > 0 then the payment is not valid
notifier.setStatus(m_dPaid > 0.0 && iCompare <= 0, iCompare == 0);
}
}
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:30,代码来源:JPaymentDebt.java
示例15: printState
import com.openbravo.pos.util.RoundUtils; //导入依赖的package包/类
private void printState() {
if (customerext == null) {
m_jMoneyEuros.setText(null);
jlblMessage.setText(AppLocal.getIntString("message.nocustomernodebt"));
notifier.setStatus(false, false);
} else {
Double value = m_jTendered.getDoubleValue();
if (value == null || value == 0.0) {
m_dPaid = m_dTotal;
} else {
m_dPaid = value;
}
m_jMoneyEuros.setText(Formats.CURRENCY.formatValue(m_dPaid));
if (RoundUtils.compare(RoundUtils.getValue(customerext.getCurdebt()) + m_dPaid, RoundUtils.getValue(customerext.getMaxdebt())) >= 0) {
// maximum debt exceded
jlblMessage.setText(AppLocal.getIntString("message.customerdebtexceded"));
notifier.setStatus(false, false);
} else {
jlblMessage.setText(null);
int iCompare = RoundUtils.compare(m_dPaid, m_dTotal);
// if iCompare > 0 then the payment is not valid
notifier.setStatus(m_dPaid > 0.0 && iCompare <= 0, iCompare == 0);
}
}
}
开发者ID:gnoopy,项目名称:wifepos,代码行数:30,代码来源:JPaymentDebt.java
示例16: getPriceNoDiscount
import com.openbravo.pos.util.RoundUtils; //导入依赖的package包/类
public Double getPriceNoDiscount() {
Double discountrate = getDiscountRate();
Double discountmoney = getDiscountMoney() / (1.0 + getTaxRate());
Double pricenodiscount = 0.0;
if (discountrate != 1.0) {
pricenodiscount = getPrice() / (1 - getDiscountRate());
}
if (discountmoney != 0.0) {
pricenodiscount = pricenodiscount + discountmoney;
}
return RoundUtils.round(pricenodiscount);
}
开发者ID:nordpos,项目名称:nordpos,代码行数:16,代码来源:TicketLineInfo.java
示例17: getPriceTaxNoDiscount
import com.openbravo.pos.util.RoundUtils; //导入依赖的package包/类
public Double getPriceTaxNoDiscount() {
Double discountrate = getDiscountRate();
Double discountmoney = getDiscountMoney();
Double pricenodiscount = 0.0;
if (discountrate != 1.0) {
pricenodiscount = getPriceTax() / (1 - getDiscountRate());
}
if (discountmoney != 0.0) {
pricenodiscount = pricenodiscount + discountmoney;
}
return RoundUtils.round(pricenodiscount);
}
开发者ID:nordpos,项目名称:nordpos,代码行数:16,代码来源:TicketLineInfo.java
示例18: printState
import com.openbravo.pos.util.RoundUtils; //导入依赖的package包/类
private void printState() {
if (customerext == null) {
m_jNotes.setText(null);
txtMaxdebt.setText(null);
txtCurdate.setText(null);
txtCurdebt.setText(null);
m_jMoneyEuros.setText(null);
jlblMessage.setText(AppLocal.getIntString("message.nocustomernodebt"));
notifier.setStatus(false, false);
} else {
m_jNotes.setText(customerext.getNotes());
txtMaxdebt.setText(Formats.CURRENCY.formatValue(RoundUtils.getValue(customerext.getMaxdebt())));
txtCurdate.setText(Formats.DATE.formatValue(customerext.getCurdate()));
txtCurdebt.setText(Formats.CURRENCY.formatValue(RoundUtils.getValue(customerext.getCurdebt())));
Double value = m_jTendered.getDoubleValue();
if (value == null || value == 0.0) {
m_dPaid = m_dTotal;
} else {
m_dPaid = value;
}
m_jMoneyEuros.setText(Formats.CURRENCY.formatValue(m_dPaid));
if (RoundUtils.compare(RoundUtils.getValue(customerext.getCurdebt()) + m_dPaid, RoundUtils.getValue(customerext.getMaxdebt())) >= 0) {
// maximum debt exceded
jlblMessage.setText(AppLocal.getIntString("message.customerdebtexceded"));
notifier.setStatus(false, false);
} else {
jlblMessage.setText(null);
int iCompare = RoundUtils.compare(m_dPaid, m_dTotal);
// if iCompare > 0 then the payment is not valid
notifier.setStatus(m_dPaid > 0.0 && iCompare <= 0, iCompare == 0);
}
}
}
开发者ID:nordpos,项目名称:nordpos,代码行数:40,代码来源:JPaymentDebt.java
示例19: printState
import com.openbravo.pos.util.RoundUtils; //导入依赖的package包/类
private void printState() {
if (customerext == null) {
m_jMoneyEuros.setText(null);
jlblMessage.setText(AppLocal.getIntString("message.nocustomernodebt"));
notifier.setStatus(false, false, true);
} else {
Double value = m_jTendered.getDoubleValue();
if (value == null || value == 0.0) {
m_dPaid = m_dTotal;
} else {
m_dPaid = value;
}
m_jMoneyEuros.setText(Formats.CURRENCY.formatValue(new Double(m_dPaid)));
if (RoundUtils.compare(RoundUtils.getValue(customerext.getCurdebt()) + m_dPaid, RoundUtils.getValue(customerext.getMaxdebt())) > 0) {
// maximum debt exceded
jlblMessage.setText(AppLocal.getIntString("message.customerdebtexceded"));
notifier.setStatus(false, false, true);
} else {
jlblMessage.setText(null);
int iCompare = RoundUtils.compare(m_dPaid, m_dTotal);
// if iCompare > 0 then the payment is not valid
notifier.setStatus(m_dPaid > 0.0 && iCompare <= 0, iCompare == 0, true);
}
}
}
开发者ID:ZarGate,项目名称:OpenbravoPOS,代码行数:30,代码来源:JPaymentDebt.java
示例20: printMaxDebt
import com.openbravo.pos.util.RoundUtils; //导入依赖的package包/类
public String printMaxDebt() {
return Formats.CURRENCY.formatValue(RoundUtils.getValue(getMaxdebt()));
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:4,代码来源:CustomerInfoExt.java
注:本文中的com.openbravo.pos.util.RoundUtils类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论