本文整理汇总了Java中com.openbravo.pos.inventory.TaxCategoryInfo类的典型用法代码示例。如果您正苦于以下问题:Java TaxCategoryInfo类的具体用法?Java TaxCategoryInfo怎么用?Java TaxCategoryInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TaxCategoryInfo类属于com.openbravo.pos.inventory包,在下文中一共展示了TaxCategoryInfo类的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getTaxRate
import com.openbravo.pos.inventory.TaxCategoryInfo; //导入依赖的package包/类
public double getTaxRate(TaxCategoryInfo tc, Date date, CustomerInfoExt customer) {
if (tc == null) {
return 0.0;
} else {
return getTaxRate(tc.getID(), date, customer);
}
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:9,代码来源:TaxesLogic.java
示例2: getInputProduct
import com.openbravo.pos.inventory.TaxCategoryInfo; //导入依赖的package包/类
private ProductInfoExt getInputProduct() {
ProductInfoExt oProduct = new ProductInfoExt(); // Es un ticket
oProduct.setReference(null);
oProduct.setCode(null);
oProduct.setName("");
oProduct.setTaxCategoryID(((TaxCategoryInfo) taxcategoriesmodel.getSelectedItem()).getID());
oProduct.setPriceSell(includeTaxes(oProduct.getTaxCategoryID(), getInputValue()));
return oProduct;
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:12,代码来源:JPanelTicket.java
示例3: getUserList
import com.openbravo.pos.inventory.TaxCategoryInfo; //导入依赖的package包/类
public final SentenceList getUserList() {
return new StaticSentence(s
, "SELECT ID, NAME FROM PEOPLE ORDER BY NAME"
, null
, new SerializerRead() { public Object readValues(DataRead dr) throws BasicException {
return new TaxCategoryInfo(
dr.getString(1),
dr.getString(2));
}});
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:11,代码来源:DataLogicSales.java
示例4: getTaxCategoriesList
import com.openbravo.pos.inventory.TaxCategoryInfo; //导入依赖的package包/类
public final SentenceList getTaxCategoriesList() {
return new StaticSentence(s
, "SELECT ID, NAME FROM TAXCATEGORIES ORDER BY NAME"
, null
, new SerializerRead() { public Object readValues(DataRead dr) throws BasicException {
return new TaxCategoryInfo(dr.getString(1), dr.getString(2));
}});
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:9,代码来源:DataLogicSales.java
示例5: syncTaxCategory
import com.openbravo.pos.inventory.TaxCategoryInfo; //导入依赖的package包/类
public void syncTaxCategory(final TaxCategoryInfo taxcat) throws BasicException {
Transaction t = new Transaction(s) {
public Object transact() throws BasicException {
// Sync the Tax in a transaction
// Try to update
if (new PreparedSentence(s,
"UPDATE TAXCATEGORIES SET NAME = ? WHERE ID = ?",
SerializerWriteParams.INSTANCE
).exec(new DataParams() { public void writeValues() throws BasicException {
setString(1, taxcat.getName());
setString(2, taxcat.getID());
}}) == 0) {
// If not updated, try to insert
new PreparedSentence(s,
"INSERT INTO TAXCATEGORIES(ID, NAME) VALUES (?, ?)",
SerializerWriteParams.INSTANCE
).exec(new DataParams() { public void writeValues() throws BasicException {
setString(1, taxcat.getID());
setString(2, taxcat.getName());
}});
}
return null;
}
};
t.execute();
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:31,代码来源:DataLogicIntegration.java
示例6: getTaxRate
import com.openbravo.pos.inventory.TaxCategoryInfo; //导入依赖的package包/类
/**
*
* @param tc
* @param customer
* @return
*/
public double getTaxRate(TaxCategoryInfo tc, CustomerInfoExt customer) {
if (tc == null) {
return 0.0;
} else {
return getTaxRate(tc.getID(), customer);
}
}
开发者ID:gnoopy,项目名称:wifepos,代码行数:15,代码来源:TaxesLogic.java
示例7: getInputProduct
import com.openbravo.pos.inventory.TaxCategoryInfo; //导入依赖的package包/类
private ProductInfoExt getInputProduct() {
ProductInfoExt oProduct = new ProductInfoExt(); // Es un ticket
// JG 6 May 14 - always add Default Prod ID + Null Name if free line entry
oProduct.setID("xxx999_999xxx_x9x9x9");
oProduct.setReference(null);
oProduct.setCode(null);
oProduct.setName("");
oProduct.setTaxCategoryID(((TaxCategoryInfo) taxcategoriesmodel.getSelectedItem()).getID());
oProduct.setPriceSell(includeTaxes(oProduct.getTaxCategoryID(), getInputValue()));
return oProduct;
}
开发者ID:gnoopy,项目名称:wifepos,代码行数:13,代码来源:JPanelTicket.java
示例8: getSellPrice
import com.openbravo.pos.inventory.TaxCategoryInfo; //导入依赖的package包/类
/**
* Adjusts the sell price for included taxes if needed and converted to
* <code>double</code>
*
* @param pSellPrice sell price to be converted
* @return sell price after adjustment for included taxes and converted to <code>double</double>
*/
private Double getSellPrice(String pSellPrice) {
// Check if the selling price icludes taxes
dTaxRate = taxeslogic.getTaxRate((TaxCategoryInfo) taxcatmodel.getSelectedItem());
if (jCheckSellIncTax.isSelected()) {
return ((Double.parseDouble(pSellPrice)) / (1 + dTaxRate));
} else {
return (Double.parseDouble(pSellPrice));
}
}
开发者ID:gnoopy,项目名称:wifepos,代码行数:17,代码来源:JPanelCSVImport.java
示例9: getInputProduct
import com.openbravo.pos.inventory.TaxCategoryInfo; //导入依赖的package包/类
private ProductInfoExt getInputProduct() {
ProductInfoExt oProduct = new ProductInfoExt(); // Es un ticket
oProduct.setReference(null);
oProduct.setCode(null);
oProduct.setName("");
oProduct.setTaxCategoryID(((TaxCategoryInfo) taxcategoriesmodel.getSelectedItem()).getID());
oProduct.setPriceSell(includeTaxes(oProduct.getTaxCategoryID(), getInputValue()));
return oProduct;
}
开发者ID:nordpos,项目名称:nordpos,代码行数:12,代码来源:JPanelTicket.java
示例10: getUserList
import com.openbravo.pos.inventory.TaxCategoryInfo; //导入依赖的package包/类
public final SentenceList getUserList() {
return new StaticSentence(s
, "SELECT ID, NAME FROM PEOPLE ORDER BY NAME"
, null
, new SerializerRead() { public Object readValues(DataRead dr) throws BasicException {
return new TaxCategoryInfo(
dr.getString(1),
dr.getString(2));
}});
}
开发者ID:nordpos,项目名称:nordpos,代码行数:11,代码来源:DataLogicSales.java
示例11: getTaxInfo
import com.openbravo.pos.inventory.TaxCategoryInfo; //导入依赖的package包/类
public TaxInfo getTaxInfo(TaxCategoryInfo tc, Date date) {
return getTaxInfo(tc.getID(), date, null);
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:4,代码来源:TaxesLogic.java
示例12: activate
import com.openbravo.pos.inventory.TaxCategoryInfo; //导入依赖的package包/类
public void activate() throws BasicException {
paymentdialogreceipt = JPaymentSelectReceipt.getDialog(this);
paymentdialogreceipt.init(m_App);
paymentdialogrefund = JPaymentSelectRefund.getDialog(this);
paymentdialogrefund.init(m_App);
// impuestos incluidos seleccionado ?
m_jaddtax.setSelected("true".equals(m_jbtnconfig.getProperty("taxesincluded")));
// Inicializamos el combo de los impuestos.
java.util.List<TaxInfo> taxlist = senttax.list();
taxcollection = new ListKeyed<TaxInfo>(taxlist);
java.util.List<TaxCategoryInfo> taxcategorieslist = senttaxcategories.list();
taxcategoriescollection = new ListKeyed<TaxCategoryInfo>(taxcategorieslist);
taxcategoriesmodel = new ComboBoxValModel(taxcategorieslist);
m_jTax.setModel(taxcategoriesmodel);
String taxesid = m_jbtnconfig.getProperty("taxcategoryid");
if (taxesid == null) {
if (m_jTax.getItemCount() > 0) {
m_jTax.setSelectedIndex(0);
}
} else {
taxcategoriesmodel.setSelectedKey(taxesid);
}
taxeslogic = new TaxesLogic(taxlist);
// Show taxes options
if (m_App.getAppUserView().getUser().hasPermission("sales.ChangeTaxOptions")) {
m_jTax.setVisible(true);
m_jaddtax.setVisible(true);
} else {
m_jTax.setVisible(false);
m_jaddtax.setVisible(false);
}
// Authorization for buttons
btnSplit.setEnabled(m_App.getAppUserView().getUser().hasPermission("sales.Total"));
m_jDelete.setEnabled(m_App.getAppUserView().getUser().hasPermission("sales.EditLines"));
m_jNumberKeys.setMinusEnabled(m_App.getAppUserView().getUser().hasPermission("sales.EditLines"));
m_jNumberKeys.setEqualsEnabled(m_App.getAppUserView().getUser().hasPermission("sales.Total"));
m_jbtnconfig.setPermissions(m_App.getAppUserView().getUser());
m_ticketsbag.activate();
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:49,代码来源:JPanelTicket.java
示例13: createValue
import com.openbravo.pos.inventory.TaxCategoryInfo; //导入依赖的package包/类
@Override
public Object createValue() throws BasicException {
Object[] afilter = new Object[14];
// Ticket ID
if (jtxtTicketID.getText() == null || jtxtTicketID.getText().equals("")) {
afilter[0] = QBFCompareEnum.COMP_NONE;
afilter[1] = null;
} else {
afilter[0] = QBFCompareEnum.COMP_EQUALS;
afilter[1] = jtxtTicketID.getValueInteger();
}
// Sale and refund checkbox
if (jComboBoxTicket.getSelectedIndex() == 2) {
afilter[2] = QBFCompareEnum.COMP_DISTINCT;
afilter[3] = 2;
} else if (jComboBoxTicket.getSelectedIndex() == 0) {
afilter[2] = QBFCompareEnum.COMP_EQUALS;
afilter[3] = 0;
} else if (jComboBoxTicket.getSelectedIndex() == 1) {
afilter[2] = QBFCompareEnum.COMP_EQUALS;
afilter[3] = 1;
}
// Receipt money
afilter[5] = jtxtMoney.getDoubleValue();
afilter[4] = afilter[5] == null ? QBFCompareEnum.COMP_NONE : jcboMoney.getSelectedItem();
// Date range
Object startdate = Formats.TIMESTAMP.parseValue(jTxtStartDate.getText());
Object enddate = Formats.TIMESTAMP.parseValue(jTxtEndDate.getText());
afilter[6] = (startdate == null) ? QBFCompareEnum.COMP_NONE : QBFCompareEnum.COMP_GREATEROREQUALS;
afilter[7] = startdate;
afilter[8] = (enddate == null) ? QBFCompareEnum.COMP_NONE : QBFCompareEnum.COMP_LESS;
afilter[9] = enddate;
//User
if (jcboUser.getSelectedItem() == null) {
afilter[10] = QBFCompareEnum.COMP_NONE;
afilter[11] = null;
} else {
afilter[10] = QBFCompareEnum.COMP_EQUALS;
afilter[11] = ((TaxCategoryInfo)jcboUser.getSelectedItem()).getName();
}
//Customer
if (jtxtCustomer.getText() == null || jtxtCustomer.getText().equals("")) {
afilter[12] = QBFCompareEnum.COMP_NONE;
afilter[13] = null;
} else {
afilter[12] = QBFCompareEnum.COMP_RE;
afilter[13] = "%" + jtxtCustomer.getText() + "%";
}
return afilter;
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:63,代码来源:JTicketsFinder.java
示例14: activate
import com.openbravo.pos.inventory.TaxCategoryInfo; //导入依赖的package包/类
/**
*
* @throws BasicException
*/
@Override
public void activate() throws BasicException {
// added by JDL 26.04.13
// lets look at adding a timer event fot auto logoff if required
Action logout = new logout();
String autoLogoff = (m_App.getProperties().getProperty("till.autoLogoff"));
if (autoLogoff != null){
if (autoLogoff.equals("true")){
try{
delay = Integer.parseInt(m_App.getProperties().getProperty("till.autotimer"));
// JG 19 Feb 14 - }catch (Exception e){
}catch (NumberFormatException e){
delay=0;
}
delay *= 1000;
}}
// if the delay period is not zero create a inactivitylistener instance
if (delay != 0){
listener = new InactivityListener(logout,delay);
listener.start();
}
paymentdialogreceipt = JPaymentSelectReceipt.getDialog(this);
paymentdialogreceipt.init(m_App);
paymentdialogrefund = JPaymentSelectRefund.getDialog(this);
paymentdialogrefund.init(m_App);
// impuestos incluidos seleccionado ?
m_jaddtax.setSelected("true".equals(m_jbtnconfig.getProperty("taxesincluded")));
// JG May 2013 use Diamond inference
java.util.List<TaxInfo> taxlist = senttax.list();
taxcollection = new ListKeyed<>(taxlist);
java.util.List<TaxCategoryInfo> taxcategorieslist = senttaxcategories.list();
taxcategoriescollection = new ListKeyed<>(taxcategorieslist);
taxcategoriesmodel = new ComboBoxValModel(taxcategorieslist);
m_jTax.setModel(taxcategoriesmodel);
String taxesid = m_jbtnconfig.getProperty("taxcategoryid");
if (taxesid == null) {
if (m_jTax.getItemCount() > 0) {
m_jTax.setSelectedIndex(0);
}
} else {
taxcategoriesmodel.setSelectedKey(taxesid);
}
taxeslogic = new TaxesLogic(taxlist);
// Added JDL change the startup state of addtax button
// JG 19 Feb 14 unnecessary parse - m_jaddtax.setSelected((Boolean.valueOf(m_App.getProperties().getProperty("till.taxincluded")).booleanValue()));
m_jaddtax.setSelected((Boolean.parseBoolean(m_App.getProperties().getProperty("till.taxincluded"))));
// Show taxes options
if (m_App.getAppUserView().getUser().hasPermission("sales.ChangeTaxOptions")) {
m_jTax.setVisible(true);
m_jaddtax.setVisible(true);
} else {
m_jTax.setVisible(false);
m_jaddtax.setVisible(false);
}
// Authorization for buttons
btnSplit.setEnabled(m_App.getAppUserView().getUser().hasPermission("sales.Total"));
m_jDelete.setEnabled(m_App.getAppUserView().getUser().hasPermission("sales.EditLines"));
m_jNumberKeys.setMinusEnabled(m_App.getAppUserView().getUser().hasPermission("sales.EditLines"));
m_jNumberKeys.setEqualsEnabled(m_App.getAppUserView().getUser().hasPermission("sales.Total"));
m_jbtnconfig.setPermissions(m_App.getAppUserView().getUser());
m_ticketsbag.activate();
}
开发者ID:gnoopy,项目名称:wifepos,代码行数:80,代码来源:JPanelTicket.java
示例15: createValue
import com.openbravo.pos.inventory.TaxCategoryInfo; //导入依赖的package包/类
/**
*
* @return
* @throws BasicException
*/
@Override
public Object createValue() throws BasicException {
Object[] afilter = new Object[14];
// Ticket ID
if (jtxtTicketID.getText() == null || jtxtTicketID.getText().equals("")) {
afilter[0] = QBFCompareEnum.COMP_NONE;
afilter[1] = null;
} else {
afilter[0] = QBFCompareEnum.COMP_EQUALS;
afilter[1] = jtxtTicketID.getValueInteger();
}
// Sale and refund checkbox
if (jComboBoxTicket.getSelectedIndex() == 2) {
afilter[2] = QBFCompareEnum.COMP_DISTINCT;
afilter[3] = 2;
} else if (jComboBoxTicket.getSelectedIndex() == 0) {
afilter[2] = QBFCompareEnum.COMP_EQUALS;
afilter[3] = 0;
} else if (jComboBoxTicket.getSelectedIndex() == 1) {
afilter[2] = QBFCompareEnum.COMP_EQUALS;
afilter[3] = 1;
}
// Receipt money
afilter[5] = jtxtMoney.getDoubleValue();
afilter[4] = afilter[5] == null ? QBFCompareEnum.COMP_NONE : jcboMoney.getSelectedItem();
// Date range
Object startdate = Formats.TIMESTAMP.parseValue(jTxtStartDate.getText());
Object enddate = Formats.TIMESTAMP.parseValue(jTxtEndDate.getText());
afilter[6] = (startdate == null) ? QBFCompareEnum.COMP_NONE : QBFCompareEnum.COMP_GREATEROREQUALS;
afilter[7] = startdate;
afilter[8] = (enddate == null) ? QBFCompareEnum.COMP_NONE : QBFCompareEnum.COMP_LESS;
afilter[9] = enddate;
//User
if (jcboUser.getSelectedItem() == null) {
afilter[10] = QBFCompareEnum.COMP_NONE;
afilter[11] = null;
} else {
afilter[10] = QBFCompareEnum.COMP_EQUALS;
afilter[11] = ((TaxCategoryInfo)jcboUser.getSelectedItem()).getName();
}
//Customer
if (jtxtCustomer.getText() == null || jtxtCustomer.getText().equals("")) {
afilter[12] = QBFCompareEnum.COMP_NONE;
afilter[13] = null;
} else {
afilter[12] = QBFCompareEnum.COMP_RE;
afilter[13] = "%" + jtxtCustomer.getText() + "%";
}
return afilter;
}
开发者ID:gnoopy,项目名称:wifepos,代码行数:68,代码来源:JTicketsFinder.java
示例16: activate
import com.openbravo.pos.inventory.TaxCategoryInfo; //导入依赖的package包/类
@Override
public void activate() throws BasicException {
paymentdialogreceipt = JPaymentSelectReceipt.getDialog(this);
paymentdialogreceipt.init(m_App);
paymentdialogrefund = JPaymentSelectRefund.getDialog(this);
paymentdialogrefund.init(m_App);
// impuestos incluidos seleccionado ?
m_jaddtax.setSelected("true".equals(panelconfig.getProperty("taxesincluded")));
// Inicializamos el combo de los impuestos.
java.util.List<TaxInfo> taxlist = senttax.list();
taxcollection = new ListKeyed<>(taxlist);
java.util.List<TaxCategoryInfo> taxcategorieslist = senttaxcategories.list();
taxcategoriesmodel = new ComboBoxValModel(taxcategorieslist);
m_jTax.setModel(taxcategoriesmodel);
// String taxesid = panelconfig.getProperty("taxcategoryid");
String taxesid = m_App.getDefaultTaxCategory();
if (taxesid == null) {
if (m_jTax.getItemCount() > 0) {
m_jTax.setSelectedIndex(0);
}
} else {
taxcategoriesmodel.setSelectedKey(taxesid);
}
taxeslogic = new TaxesLogic(taxlist);
// Show taxes options
if (m_App.getAppUserView().getUser().hasPermission("sales.ChangeTaxOptions")) {
m_jTax.setVisible(true);
m_jaddtax.setVisible(true);
} else {
m_jTax.setVisible(false);
m_jaddtax.setVisible(false);
}
// Authorization for buttons
btnSplit.setEnabled(m_App.getAppUserView().getUser().hasPermission("sales.Total"));
m_jEditLine.setEnabled(m_App.getAppUserView().getUser().hasPermission("sales.EditLines"));
m_jDelete.setEnabled(m_App.getAppUserView().getUser().hasPermission("sales.EditLines"));
m_jNumberKeys.setMinusEnabled(m_App.getAppUserView().getUser().hasPermission("sales.EditLines"));
m_jNumberKeys.setEqualsEnabled(m_App.getAppUserView().getUser().hasPermission("sales.Total"));
m_jbtnconfig.setPermissions(m_App.getAppUserView().getUser());
// Permissões para desconto
m_jDiscount1.setEnabled(m_App.getAppUserView().getUser().hasPermission("sales.Discount"));
m_jDiscount2.setEnabled(m_App.getAppUserView().getUser().hasPermission("sales.Discount"));
m_jDiscount3.setEnabled(m_App.getAppUserView().getUser().hasPermission("sales.Discount"));
m_jKeypadDiscountRate.setEnabled(m_App.getAppUserView().getUser().hasPermission("sales.DiscountMulti"));
//m_jbtnDiscount.setEnabled(m_App.getAppUserView().getUser().hasPermission("sales.Discount") || m_App.getAppUserView().getUser().hasPermission("sales.DiscountMulti"));
// Valores para descontos
m_jDiscount1.setText(Formats.PERCENT.formatValue(m_dDiscountRate1));
m_jDiscount2.setText(Formats.PERCENT.formatValue(m_dDiscountRate2));
m_jDiscount3.setText(Formats.PERCENT.formatValue(m_dDiscountRate3));
m_jDisableDiscountRate.setText(Formats.PERCENT.formatValue(0.0));
m_jDiscount4.setEnabled(m_App.getAppUserView().getUser().hasPermission("sales.Discount"));
m_jDiscount5.setEnabled(m_App.getAppUserView().getUser().hasPermission("sales.Discount"));
m_jDiscount6.setEnabled(m_App.getAppUserView().getUser().hasPermission("sales.Discount"));
m_jKeypadDiscountMoney.setEnabled(m_App.getAppUserView().getUser().hasPermission("sales.DiscountMulti"));
m_jDiscount4.setText(Formats.CURRENCY.formatValue(m_dDiscountMoney1));
m_jDiscount5.setText(Formats.CURRENCY.formatValue(m_dDiscountMoney2));
m_jDiscount6.setText(Formats.CURRENCY.formatValue(m_dDiscountMoney3));
m_jDisableDiscountMoney.setText(Formats.CURRENCY.formatValue(0.0));
m_ticketsbag.activate();
}
开发者ID:nordpos,项目名称:nordpos,代码行数:75,代码来源:JPanelTicket.java
注:本文中的com.openbravo.pos.inventory.TaxCategoryInfo类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论