def consumption_helper(self): return ConsumptionHelper( domain=self.get_domain(), case_id=self.case_id, section_id=self.section_id, entry_id=self.product_id, daily_consumption=self.daily_consumption, balance=self.balance, sql_location=self.sql_location, )
def get_consumption_helper_from_ledger_value(domain, ledger_value): return ConsumptionHelper( domain=domain, case_id=ledger_value.case_id, section_id=ledger_value.section_id, entry_id=ledger_value.entry_id, daily_consumption=ledger_value.daily_consumption, balance=ledger_value.balance, sql_location=ledger_value.sql_location, )
def get_consumption_helper_from_ledger_value(domain, ledger_value): assert isinstance(ledger_value, StockLedgerValueWrapper) return ConsumptionHelper( domain=domain, case_id=ledger_value.case_id, section_id=ledger_value.section_id, entry_id=ledger_value.entry_id, daily_consumption=ledger_value.daily_consumption, balance=ledger_value.balance, sql_location=ledger_value.sql_location, )