update
This commit is contained in:
parent
55de28532f
commit
ff619ac88a
13 changed files with 192 additions and 145 deletions
|
|
@ -10,14 +10,15 @@ class Stocks {
|
|||
try {
|
||||
final data = await _supabase
|
||||
.from('stocks')
|
||||
.select('ref_medicines(medicine_name), expiration_date, quantity, price')
|
||||
.select('ref_medicines(medicine_name, ref_generic_names(generic_name)), expiration_date, quantity, price')
|
||||
.order('ref_medicines(medicine_name)', ascending: true);
|
||||
|
||||
for (var item in data) {
|
||||
stockData.add({
|
||||
'medicine_name': item['ref_medicines']['medicine_name'],
|
||||
'quantity': item['quantity'],
|
||||
'generic_name': item['ref_medicines']['ref_generic_names']['generic_name'],
|
||||
'expiration_date': item['expiration_date'],
|
||||
'quantity': item['quantity'],
|
||||
'price': item['price'],
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue