private boolean cmd_save(){
  log.config("");
  Calendar date=new GregorianCalendar();
  getDateAndTimeFrom(date);
  Timestamp assignDateFrom=new Timestamp(date.getTimeInMillis());
  BigDecimal qty=fQty.getValue();
  ListItem listItem=fResource.getSelectedItem();
  KeyNamePair resource=listItem != null ? new KeyNamePair((Integer)listItem.getValue(),listItem.getLabel()) : null;
  KeyNamePair uom=(KeyNamePair)m_lookup.get(resource);
  int minutes=MUOMConversion.convertToMinutes(Env.getCtx(),uom.getKey(),qty);
  Timestamp assignDateTo=TimeUtil.addMinutess(assignDateFrom,minutes);
  m_mAssignment.setAssignDateTo(assignDateTo);
  return m_mAssignment.save();
}

private boolean cmd_save ( ) { log . config ( "" ) ; Calendar date = new GregorianCalendar ( ) ; getDateAndTimeFrom ( date ) ; Timestamp assignDateFrom = new Timestamp ( date . getTimeInMillis ( ) ) ; BigDecimal qty = fQty . getValue ( ) ; ListItem listItem = fResource . getSelectedItem ( ) ; KeyNamePair resource = listItem != null ? new KeyNamePair ( ( Integer ) listItem . getValue ( ) , listItem . getLabel ( ) ) : null ; KeyNamePair uom = ( KeyNamePair ) m_lookup . get ( resource ) ; int minutes = MUOMConversion . convertToMinutes ( Env . getCtx ( ) , uom . getKey ( ) , qty ) ; Timestamp assignDateTo = TimeUtil . addMinutess ( assignDateFrom , minutes ) ; m_mAssignment . setAssignDateTo ( assignDateTo ) ; return m_mAssignment . save ( ) ; }
check availability and insert record
