mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Python bindings - no instance necessary anymore
This commit is contained in:
parent
88bfbb19a0
commit
840feccbf7
@ -162,8 +162,8 @@ def invoice_to_lco(invoice):
|
||||
ent=Entry(instance=ent) # Add to method_returns_list
|
||||
|
||||
descr = ent.GetDescription()
|
||||
price = gnucash.GncNumeric(instance=ent.GetInvPrice()).to_double()
|
||||
n = gnucash.GncNumeric(instance=ent.GetQuantity()) # change gncucash_core.py
|
||||
price = ent.GetInvPrice().to_double()
|
||||
n = ent.GetQuantity()
|
||||
|
||||
uprice = locale.currency(price).rstrip(" EUR")
|
||||
un = unicode(int(float(n.num())/n.denom())) # choose best way to format numbers according to locale
|
||||
|
@ -367,9 +367,9 @@ def __entry__unicode__(self):
|
||||
"notes_name":"Notes:",
|
||||
"notes_value":self.GetNotes(),
|
||||
"quant_name":"Quantity:",
|
||||
"quant_value":unicode(gnucash.GncNumeric(instance=self.GetQuantity())),
|
||||
"quant_value":unicode(self.GetQuantity()),
|
||||
"invprice_name":"InvPrice:",
|
||||
"invprice_value":unicode(gnucash.GncNumeric(instance=self.GetInvPrice()))}
|
||||
"invprice_value":unicode(self.GetInvPrice())}
|
||||
|
||||
return (u"{date_name:6}{date_value:15} {description_name:13}{description_value:20} {notes_name:7}{notes_value:20}"+
|
||||
u"{quant_name:12}{quant_value:7} {invprice_name:10}{invprice_value:7}").\
|
||||
|
Loading…
Reference in New Issue
Block a user