Administrative

Projects

Active

Future

Finished

Reference

Abandoned

Project: EloInv

EloInv Priceinfo class

This page contains developer documentation for the Priceinfo class importable from priceinfoclass - currently, more a notepad for me than real documentation.

Public methods

Priceinfo.init()

(Priceinfo) # Priceinfo(
  invID # 0
  )

Data presentation

Priceinfo.str()

(string) #  __str__()

Priceinfo.html_table()

(string) # html_table(
  id # 0,
  [colorid # None],
  [color # 'green']
  )

id may be a numeric priceinfo ID or 'all'.

Priceinfo.cteur()

(string) # cteur(
  ct # 0
  )

Database interaction

Priceinfo.store()

store()

Data queries

Priceinfo.cheapest()

({'ID', 'supplierID', 'supplierID_txt', 'unitsize', 'datechanged', 
  'quant', 'ppu', 'ordercode', 'cntprice', 'oneprice'}) # \
    cheapest(
      [count # 1]
    )

Priceinfo.getprice()

({'ID', 'supplierID', 'supplierID_txt', 'unitsize', 'datechanged', 
  'quant', 'ppu', 'ordercode'}) # \
    getprice(
      supplierID # 0,
      [count # 1]
    )

Priceinfo.value()

(int) # value(
  [count # 1]
)

Data manipulation

Priceinfo.delete()

delete(
  id # 0
)

Priceinfo.append()

append(
  supplierID # '',
  ordercode # '',
  unitsize # 1,
  [quantA # 0],
  [ppuA # 0],
  [quantB # 0],
  [ppuB # 0],
  [quantC # 0],
  [ppuC # 0],
  [datechanged # 0]
)

Priceinfo.update()

update(
  entryid # 0,
  supplierID # '',
  ordercode # '',
  unitsize # 1,
  [quantA # 0],
  [ppuA # 0],
  [quantB # 0],
  [ppuB # 0],
  [quantC # 0],
  [ppuC # 0],
  [datechanged # 0]
)

Exceptions

InvalidData

  'DATAMISSING': 'Data missing for operation', \
  'DUPLICATE': 'Attempting to insert duplicate entry.', \
  'IDMISSING': 'Part ID missing.', \
  'INVALID': 'Invalid data.', \
  'NOINFO': 'No order information for this part.', \
  'NOTFOUND': 'ID not found in list.', \
  'UNDEF': 'Undefined InvalidData error.' \

Logbook

Last page update: 2010-01-03