IO-1914 Added inventory page.
This commit is contained in:
@@ -47,3 +47,53 @@ export const QUERY_OUTSTANDING_INVENTORY = gql`
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_INVENTORY_PAGINATED = gql`
|
||||
query QUERY_INVENTORY_PAGINATED(
|
||||
$search: String
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
$order: [inventory_order_by!]
|
||||
$consumedIsNull: Boolean
|
||||
) {
|
||||
search_inventory(
|
||||
args: { search: $search }
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
order_by: $order
|
||||
where: { consumedbybillid: { _is_null: $consumedIsNull } }
|
||||
) {
|
||||
id
|
||||
line_desc
|
||||
actual_price
|
||||
actual_cost
|
||||
bill {
|
||||
id
|
||||
invoice_number
|
||||
job {
|
||||
ro_number
|
||||
id
|
||||
}
|
||||
}
|
||||
billline {
|
||||
id
|
||||
bill {
|
||||
id
|
||||
invoice_number
|
||||
vendor {
|
||||
id
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
search_inventory_aggregate(
|
||||
args: { search: $search }
|
||||
where: { consumedbybillid: { _is_null: $consumedIsNull } }
|
||||
) {
|
||||
aggregate {
|
||||
count(distinct: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user