def amountPerformance_npv(self): """ Calculated energy service contract performance indicator """ return to_decimal( npv(self.contractDuration.years, self.contractDuration.days, self.yearlyPaymentsPercentage, self.annualCostsReduction, get_tender(self).noticePublicationDate, get_tender(self).NBUdiscountRate))
def amount_escp(self): return to_decimal( escp( self.contractDuration.years, self.contractDuration.days, self.yearlyPaymentsPercentage, self.annualCostsReduction, get_tender(self).noticePublicationDate, ))
create_tender_feature_bid_invalid, create_tender_feature_bid, tender_features_invalid, # TenderLotBidResourceTest create_tender_bid_invalid, patch_tender_bid, bids_invalidation_on_lot_change, ) from openprocurement.tender.esco.utils import to_decimal lot_bid_amountPerformance = round( to_decimal( npv( test_bids[0]["value"]["contractDuration"]["years"], test_bids[0]["value"]["contractDuration"]["days"], test_bids[0]["value"]["yearlyPaymentsPercentage"], test_bids[0]["value"]["annualCostsReduction"], get_now(), NBU_DISCOUNT_RATE, )), 2, ) lot_bid_amount = round( to_decimal( escp( test_bids[0]["value"]["contractDuration"]["years"], test_bids[0]["value"]["contractDuration"]["days"], test_bids[0]["value"]["yearlyPaymentsPercentage"], test_bids[0]["value"]["annualCostsReduction"], get_now(),
tender_lot_Administrator_change_yppr, # TenderLotFeatureBidderResourceTest create_tender_feature_bid_invalid, create_tender_feature_bid, tender_features_invalid, # TenderLotBidResourceTest create_tender_bid_invalid, patch_tender_bid, bids_invalidation_on_lot_change, ) from openprocurement.tender.esco.utils import to_decimal lot_bid_amountPerformance = round( to_decimal( npv(test_bids[0]['value']['contractDuration']['years'], test_bids[0]['value']['contractDuration']['days'], test_bids[0]['value']['yearlyPaymentsPercentage'], test_bids[0]['value']['annualCostsReduction'], get_now(), NBU_DISCOUNT_RATE)), 2) lot_bid_amount = round( to_decimal( escp(test_bids[0]['value']['contractDuration']['years'], test_bids[0]['value']['contractDuration']['days'], test_bids[0]['value']['yearlyPaymentsPercentage'], test_bids[0]['value']['annualCostsReduction'], get_now())), 2) class TenderLotResourceTest(BaseESCOContentWebTest): initial_auth = ('Basic', ('broker', '')) test_lots_data = test_lots # TODO: change attribute identifier