本文整理汇总了Java中com.openbravo.pos.ticket.TicketLineInfo.getPrice方法的典型用法代码示例。如果您正苦于以下问题:Java TicketLineInfo.getPrice方法的具体用法?Java TicketLineInfo.getPrice怎么用?Java TicketLineInfo.getPrice使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.openbravo.pos.ticket.TicketLineInfo
的用法示例。
在下文中一共展示了TicketLineInfo.getPrice方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTotalOfaTicket
import com.openbravo.pos.ticket.TicketLineInfo; //导入方法依赖的package包/类
public BigDecimal getTotalOfaTicket(String place) {
double total = 0;
for (TicketLineInfo line : findTicket(place).getM_aLines()) {
total += line.getMultiply() * line.getPrice();
}
return BigDecimal.valueOf(total);
}
示例2: addSelectedLines
import com.openbravo.pos.ticket.TicketLineInfo; //导入方法依赖的package包/类
public void addSelectedLines(TicketLineInfo[] lines) {
int i = findFirstNonAuxiliarLine();
TicketLineInfo firstline = lines[0];
if (i >= 0
&& ticket.getLine(i).getProductID() != null && firstline.getProductID() != null && ticket.getLine(i).getProductID().equals(firstline.getProductID())
&& ticket.getLine(i).getTaxInfo().getId().equals(firstline.getTaxInfo().getId())
&& ticket.getLine(i).getPrice() == firstline.getPrice()) {
// add the auxiliars.
for (int j = 1; j < lines.length; j++) {
ticket.insertLine(i + 1, lines[j]);
ticketlines.insertTicketLine(i + 1, lines[j]);
}
// inc the line
ticket.getLine(i).setMultiply(ticket.getLine(i).getMultiply() + firstline.getMultiply());
ticketlines.setTicketLine(i, ticket.getLine(i));
ticketlines.setSelectedIndex(i);
} else {
// add all at the end in inverse order.
int insertpoint = ticket.getLinesCount();
for (int j = lines.length - 1; j >= 0; j--) {
ticket.insertLine(insertpoint, lines[j]);
ticketlines.insertTicketLine(insertpoint, lines[j]);
}
}
printTotals();
}
示例3: addSelectedLines
import com.openbravo.pos.ticket.TicketLineInfo; //导入方法依赖的package包/类
/**
*
* @param lines
*/
public void addSelectedLines(TicketLineInfo[] lines) {
int i = findFirstNonAuxiliarLine();
TicketLineInfo firstline = lines[0];
if (i >= 0
&& ticket.getLine(i).getProductID() != null && firstline.getProductID() != null && ticket.getLine(i).getProductID().equals(firstline.getProductID())
&& ticket.getLine(i).getTaxInfo().getId().equals(firstline.getTaxInfo().getId())
&& ticket.getLine(i).getPrice() == firstline.getPrice()) {
// add the auxiliars.
for (int j = 1; j < lines.length; j++) {
ticket.insertLine(i + 1, lines[j]);
ticketlines.insertTicketLine(i + 1, lines[j]);
}
// inc the line
ticket.getLine(i).setMultiply(ticket.getLine(i).getMultiply() + firstline.getMultiply());
ticketlines.setTicketLine(i, ticket.getLine(i));
ticketlines.setSelectedIndex(i);
} else {
// add all at the end in inverse order.
int insertpoint = ticket.getLinesCount();
for (int j = lines.length - 1; j >= 0; j--) {
ticket.insertLine(insertpoint, lines[j]);
ticketlines.insertTicketLine(insertpoint, lines[j]);
}
}
printTotals();
}