Examples of SaleItemDiscountVO


Examples of org.jallinone.sales.documents.itemdiscounts.java.SaleItemDiscountVO

  /**
   * Callback method invoked when the user has clicked on the insert button
   * @param valueObject empty value object just created: the user can manage it to fill some attribute values
   */
  public void createValueObject(ValueObject valueObject) throws Exception {
    SaleItemDiscountVO vo = (SaleItemDiscountVO)valueObject;
    vo.setCompanyCodeSys01DOC04(panel.getParentVO().getCompanyCodeSys01DOC02());
    vo.setDocTypeDOC04(panel.getParentVO().getDocTypeDOC02());
    vo.setDocYearDOC04(panel.getParentVO().getDocYearDOC02());
    vo.setDocNumberDOC04(panel.getParentVO().getDocNumberDOC02());
    vo.setItemCodeItm01DOC04(panel.getParentVO().getItemCodeItm01DOC02());

    vo.setVariantTypeItm06DOC04(panel.getParentVO().getVariantTypeItm06DOC02());
    vo.setVariantTypeItm07DOC04(panel.getParentVO().getVariantTypeItm07DOC02());
    vo.setVariantTypeItm08DOC04(panel.getParentVO().getVariantTypeItm08DOC02());
    vo.setVariantTypeItm09DOC04(panel.getParentVO().getVariantTypeItm09DOC02());
    vo.setVariantTypeItm10DOC04(panel.getParentVO().getVariantTypeItm10DOC02());

    vo.setVariantCodeItm11DOC04(panel.getParentVO().getVariantCodeItm11DOC02());
    vo.setVariantCodeItm12DOC04(panel.getParentVO().getVariantCodeItm12DOC02());
    vo.setVariantCodeItm13DOC04(panel.getParentVO().getVariantCodeItm13DOC02());
    vo.setVariantCodeItm14DOC04(panel.getParentVO().getVariantCodeItm14DOC02());
    vo.setVariantCodeItm15DOC04(panel.getParentVO().getVariantCodeItm15DOC02());
  }
View Full Code Here

Examples of org.jallinone.sales.documents.itemdiscounts.java.SaleItemDiscountVO

   * @param oldValue old cell value (before cell editing)
   * @param newValue new cell value (just edited)
   * @return <code>true</code> if cell value is valid, <code>false</code> otherwise
   */
  public boolean validateCell(int rowNumber,String attributeName,Object oldValue,Object newValue) {
    SaleItemDiscountVO vo = (SaleItemDiscountVO)panel.getGrid().getVOListTableModel().getObjectForRow(rowNumber);
    if (attributeName.equals("valueDOC04") && newValue!=null) {
      if (vo.getPercDOC04() != null)
        vo.setPercDOC04(null);
      if (((BigDecimal)newValue).doubleValue()<vo.getMinValueDOC04().doubleValue())
        return false;
      else if (((BigDecimal)newValue).doubleValue()>vo.getMaxValueDOC04().doubleValue())
        return false;
    }
    else if (attributeName.equals("percDOC04") && newValue!=null) {
      if (vo.getValueDOC04() != null)
        vo.setValueDOC04(null);
      if (((BigDecimal)newValue).doubleValue()<vo.getMinPercDOC04().doubleValue())
        return false;
      else if (((BigDecimal)newValue).doubleValue()>vo.getMaxPercDOC04().doubleValue())
        return false;
    }
    return true;
  }
View Full Code Here

Examples of org.jallinone.sales.documents.itemdiscounts.java.SaleItemDiscountVO

   * @param rowNumbers row indexes related to the new rows to save
   * @param newValueObjects list of new value objects to save
   * @return an ErrorResponse value object in case of errors, VOListResponse if the operation is successfully completed
   */
  public Response insertRecords(int[] rowNumbers, ArrayList newValueObjects) throws Exception {
    SaleItemDiscountVO vo = null;
    Response res = null;

    for(int i=0;i<newValueObjects.size();i++) {
      vo = (SaleItemDiscountVO)newValueObjects.get(i);
      res = checkDiscount(vo);
View Full Code Here

Examples of org.jallinone.sales.documents.itemdiscounts.java.SaleItemDiscountVO

   * @param oldPersistentObjects old value objects, previous the changes
   * @param persistentObjects value objects relatied to the changed rows
   * @return an ErrorResponse value object in case of errors, VOListResponse if the operation is successfully completed
   */
  public Response updateRecords(int[] rowNumbers,ArrayList oldPersistentObjects,ArrayList persistentObjects) throws Exception {
    SaleItemDiscountVO vo = null;
    for(int i=0;i<persistentObjects.size();i++) {
      vo = (SaleItemDiscountVO)persistentObjects.get(i);
      Response res = checkDiscount(vo);
      if (res.isError())
        return res;
View Full Code Here

Examples of org.jallinone.sales.documents.itemdiscounts.java.SaleItemDiscountVO

   * @param row selected row index
   * @param attributeName attribute name that identifies the selected grid column
   * @return <code>true</code> if the selected cell is editable, <code>false</code> otherwise
   */
  public boolean isCellEditable(GridControl grid,int row,String attributeName) {
    SaleItemDiscountVO vo = (SaleItemDiscountVO)grid.getVOListTableModel().getObjectForRow(row);
    if (attributeName.equals("valueDOC04") && vo.getMinValueDOC04()==null) {
      return false;
    }
    else if (attributeName.equals("percDOC04") && vo.getMinPercDOC04()==null) {
      return false;
    }
    return grid.isFieldEditable(row,attributeName);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.