/** * Get the current field count. */ public double getCount() { double dMainValue = 0; if (m_fldMain != null) dMainValue = m_fldMain.getValue(); // Set in main file's field return dMainValue; } /**
/** * Get number of pax. */ public int getCountPax() { return (int)this.getField(Booking.PAX).getValue(); } /**
/** * GetPaxInRoom Method. */ public int getPaxInRoom() { int iRoomType = (int)this.getField(PaxCategory.ROOM_TYPE).getValue(); if ((iRoomType >= PaxCategory.SINGLE_ID) && (iRoomType <= PaxCategory.QUAD_ID)) return iRoomType; return 1; } /**
/** * Compute the target value. * @param srcValue The value of this listener's owner. * @return The value to set the target field to. */ public double computeValue(double dSrcValue) { double dEndValue = m_recAcctDetailScreenRecord.getField(AcctDetailScreenRecord.START_BALANCE).getValue(); dEndValue += m_recAcctDetailScreenRecord.getField(AcctDetailScreenRecord.CHANGE_BALANCE).getValue(); return dEndValue; }
/** * UpdateBookingComponentCostPricing Method. */ public int updateBookingComponentCostPricing(Booking recBooking, int iChangeType) { int iErrorCode = DBConstants.NORMAL_RETURN; double dCost = this.getField(BookingDetail.TOTAL_COST_LOCAL).getValue(); int iQuantity = (int)this.getField(BookingCar.QUANTITY).getValue(); iErrorCode = this.updateBookingLine(this.getBookingLine(), PricingType.COMPONENT_COST_PRICING, PaxCategory.ALL_ID, iQuantity, dCost, true, recBooking.getField(Booking.COMMISSION).getValue(), null, PricingStatus.OKAY, iChangeType); return iErrorCode; } /**
/** * Add this TrxStatus to the filter. */ public void addTrxStatusID(TrxStatus recTrxStatus) { this.addFilter(new Integer((int)recTrxStatus.getField(TrxStatus.ID).getValue())); } /**
/** * Convert to USD. */ public double convertCostToUSD(double dCost, boolean bCostingExchange) { double dExchange; if ((bCostingExchange) && (!this.getField(Currencys.COSTING_RATE).isNull())) dExchange = this.getField(Currencys.COSTING_RATE).getValue(); else dExchange = this.getField(Currencys.LAST_RATE).getValue(); dCost = Math.floor(dCost * dExchange * 100.00 + 0.5) / 100.00; return dCost; }
/** * Get the transaction amount for this type of transaction. * @param fldTypicalBalance The typical balance field (Debit/Credit/none). * @return The transaction amount. */ public double getTrxAmount(BaseField fldTypicalBalance) { return this.getOwner().getField(ApTrx.INVOICE_LOCAL).getValue(); }
/** * Get the transaction amount for this type of transaction. * @param fldTypicalBalance The typical balance field (Debit/Credit/none). * @return The transaction amount. */ public double getTrxAmount(BaseField fldTypicalBalance) { return this.getOwner().getField(ApTrx.INVOICE_LOCAL).getValue(); }
/** * Get the transaction amount for this type of transaction. * @param fldTypicalBalance The typical balance field (Debit/Credit/none). * @return The transaction amount. */ public double getTrxAmount(BaseField fldTypicalBalance) { return this.getOwner().getField(TicketTrx.NET_FARE).getValue(); }
/** * Get the value to add (Overidden from SubCountHandler). * If there was a field specified, return the value, otherwise just return a count of 1. * @return The field value. */ public double getFieldValue() { // Read a valid record if (m_fsToCount == -1) return 1; // Count records. else return this.getOwner().getField(m_fsToCount).getValue(); // Default implementation only counts records! } /**
/** * If all the data in the screen record that is required for a query is there, * return true. If not, false. */ public boolean isQueryComplete() { boolean bQueryComplete = super.isQueryComplete(); if ((bQueryComplete) && (m_recProductVars.getField(ProductScreenRecord.PAX).getValue() > 0)) return true; return false; } /**
/** * Called when a valid record is read from the table/query. * @param bDisplayOption If true, display any changes. */ public void doValidRecord(boolean bDisplayOption) { m_iOriginalMessageTransportID = (int)this.getOwner().getField(MessageDetail.kMessageTransportID).getValue(); m_iOriginalDefaultMessageTransportID = (int)this.getOwner().getField(MessageDetail.kDefaultMessageTransportID).getValue(); super.doValidRecord(bDisplayOption); } /**
/** * Called when a valid record is read from the table/query. * @param bDisplayOption If true, display any changes. */ public void doValidRecord(boolean bDisplayOption) { m_iOldPricingStatusID = (int)this.getOwner().getField(BookingLine.PRICING_STATUS_ID).getValue(); super.doValidRecord(bDisplayOption); } /**
/** * FieldChanged Method. */ public int fieldChanged(boolean bDisplayOption, int iMoveMode) { double dGross = this.getOwner().getRecord().getField(Mco.GROSS).getValue(); double dCommAmt = this.getOwner().getRecord().getField(Mco.COMM_AMT).getValue(); double dSvcAmt = this.getOwner().getRecord().getField(Mco.SVC_AMT).getValue(); double dTaxAmt = this.getOwner().getRecord().getField(Mco.TAX_AMT).getValue(); double dNet = Math.floor((dGross - dCommAmt - dSvcAmt - dTaxAmt) * 100.00 + 0.5) / 100.00; this.getOwner().getRecord().getField(Mco.NET).setValue(dNet); return super.fieldChanged(bDisplayOption, iMoveMode); }
/** * Called when a valid record is read from the table/query. * @param bDisplayOption If true, display any changes. */ public void doValidRecord(boolean bDisplayOption) { super.doValidRecord(bDisplayOption); this.setOldGroupID((int)this.getOwner().getField(UserPermission.kUserGroupID).getValue()); } /**
/** * Is this a new transaction (or a modification of a current transaction). * If it is not new, the system will calculate the current posting and do an adjusting entry. */ public boolean isNewTrx(int iChangeType) { if (this.getOwner().getField(ApTrx.TRX_STATUS_ID).getValue() == this.getTrxStatusID(TicketTrx.OVER_RIDE_PAID)) return false; return super.isNewTrx(iChangeType); } /**
/** * Called when a valid record is read from the table/query. * @param bDisplayOption If true, display any changes. */ public void doValidRecord(boolean bDisplayOption) { super.doValidRecord(bDisplayOption); this.setOldGroupID((int)this.getOwner().getField(UserPermission.USER_GROUP_ID).getValue()); } /**
public Object doGetData() { double dStartBalance = this.getOwner().getRecord().getField(GenledScreenRecord.START_BALANCE).getValue(); double dChangeBalance = this.getOwner().getRecord().getField(GenledScreenRecord.CHANGE_BALANCE).getValue(); this.getOwner().setValue(dStartBalance + dChangeBalance); return super.doGetData(); } });
/** * FieldChanged Method. */ public int fieldChanged(boolean bDisplayOption, int iMoveMode) { int iTourStatus = (int)this.getOwner().getValue(); if (iTourStatus == TourStatus.OKAY) this.getOwner().getRecord().getField(Tour.SERV_CONF).setState(true, bDisplayOption, iMoveMode); // Trigger the services confirmed event return super.fieldChanged(bDisplayOption, iMoveMode); }