public App_History(App_WorkTicket workTicket, CI_Item item, JT_EquipmentAsset equipmentAsset,
                    JT_ServiceAgreementHeader serviceAgreementHeader, JT_ServiceAgreementDetail serviceAgreementDetail,
                    JT_Transaction transaction, JT_LaborText laborText)
 {
     _workTicket             = workTicket;
     _item                   = item;
     _equipmentAsset         = equipmentAsset;
     _serviceAgreementHeader = serviceAgreementHeader;
     if (serviceAgreementDetail == null)
     {
         _serviceAgreementDetail = new JT_ServiceAgreementDetail();
     }
     else
     {
         _serviceAgreementDetail = serviceAgreementDetail;
     }
     _transaction = transaction;
     if (laborText == null)
     {
         _laborText = new JT_LaborText();
     }
     else
     {
         _laborText = laborText;
     }
 }
 public App_History(App_WorkTicket workTicket, CI_Item item, JT_EquipmentAsset equipmentAsset,
                    JT_ServiceAgreementHeader serviceAgreementHeader, JT_ServiceAgreementDetail serviceAgreementDetail,
                    JT_TransactionHistory transactionHistory, JT_LaborText laborText)
 {
     _workTicket             = workTicket;
     _item                   = item;
     _equipmentAsset         = equipmentAsset;
     _serviceAgreementHeader = serviceAgreementHeader;
     _serviceAgreementDetail = serviceAgreementDetail;
     _transaction            = new JT_Transaction()
     {
         Comment         = transactionHistory.Comment,
         HoursWorked     = transactionHistory.HoursWorked,
         ItemCode        = transactionHistory.ItemCode,
         ItemCodeDesc    = transactionHistory.ItemCodeDesc,
         QuantityUsed    = transactionHistory.QuantityUsed,
         RecordType      = transactionHistory.RecordType,
         SalesOrderNo    = transactionHistory.SalesOrderNo,
         TransactionDate = transactionHistory.TransactionDate,
         WTNumber        = transactionHistory.WTNumber,
         WTStep          = transactionHistory.WTStep
     };
     _transactionHistory = transactionHistory;
     _laborText          = laborText;
 }
Example #3
0
 public App_History(App_WorkTicket workTicket, CI_Item item, JT_EquipmentAsset equipmentAsset,
                    JT_ServiceAgreementHeader serviceAgreementHeader, JT_ServiceAgreementDetail serviceAgreementDetail,
                    JT_Transaction transaction, JT_LaborText laborText)
 {
     _workTicket             = workTicket;
     _item                   = item;
     _equipmentAsset         = equipmentAsset;
     _serviceAgreementHeader = serviceAgreementHeader;
     _serviceAgreementDetail = serviceAgreementDetail;
     _transaction            = transaction;
     _laborText              = laborText;
 }
        public App_RepairPart(JT_EquipmentAsset part, App_WorkTicket workTicket, CI_Item item)
        {
            _ciOptions           = App.Database.GetCIOptions();
            quantityFormatString = String.Concat("{0:F", _ciOptions.NumberOfDecimalPlacesInQty, "}");
            umFormatString       = string.Concat("{0:F", _ciOptions.NumberOfDecimalPlacesInUM, "}");
            costFormatString     = string.Concat("{0:F", _ciOptions.NumberOfDecimalPlacesInCost, "}");
            priceFormatString    = string.Concat("{0:F", _ciOptions.NumberOfDecimalPlacesInPrice, "}");

            _workTicket              = workTicket;
            _id                      = 0;
            _parentItemCode          = workTicket.DtlRepairItemCode;
            _partItemCode            = part.ItemCode;
            _partItemCodeDescription = item.ItemCodeDesc;
            _warehouse               = item.DefaultWarehouseCode;
            _problemCode             = workTicket.DtlProblemCode;
            _quantity                = 0.0;

            // dch rkl 12/02/2016 Get Item Unit Cost based on JT_Options.DefaultPartsCost
            _unitCost = GetItemUnitCost(item.LastTotalUnitCost, item.AverageUnitCost, item.StandardUnitCost);
            //_unitCost = (double)item.StandardUnitCost;

            _unitPrice = Convert.ToDouble(item.StandardUnitPrice);

            // dch rkl 02/03/2017 Use the sales unit of measure instead of the standard unit of measure
            //_unitOfMeasure = item.StandardUnitOfMeasure;
            _unitOfMeasure = item.SalesUnitOfMeasure;

            _comment      = string.Empty;
            _isChargeable = SetIsChargeable();
            _isPrintable  = (_isChargeable ? true : false);
            _isPurchased  = false;
            _isOverhead   = _workTicket.PartsCalculateOverheadDefault;

            // dch rkl 11/23/2016 Add Item Type
            _itemType = item.ItemType;

            // dch rkl 12/05/2016 Add Item Valuation
            _valuation = item.Valuation;

            // dch rkl 11/30/2016 add quantity required
            _quantityReqd = 0;

            // dch rkl 12/05/2016 add qty shipped
            _quantityShipped = 0;

            // dch rkl 01/13/2017 Add Extended Description
            _itemCodeDesc = "";

            // dch rkl 01/23/2017 Sales Order Line Key
            _soLineKey = "";
        }
Example #5
0
 public App_Item(CI_Item item, IM_ItemWarehouse itemWarehouse, JT_EquipmentAsset equipmentAsset)
 {
     _item           = item;
     _itemWarehouse  = itemWarehouse;
     _equipmentAsset = equipmentAsset;
 }
 public App_RepairItem(CI_Item repairItem, JT_EquipmentAsset equipmentAsset)
 {
     _repairItem     = repairItem;
     _equipmentAsset = equipmentAsset;
 }