Add shop name to `invdata`

This commit is contained in:
Rene Vergara 2023-06-21 14:59:34 -05:00
parent bd4d611d04
commit b638b4bbce
Signed by: pitmutt
GPG Key ID: 65122AD495A7F5B2
1 changed files with 12 additions and 0 deletions

View File

@ -654,6 +654,7 @@ routes pipe config = do
(object
[ "reportType" .= (1 :: Integer)
, "order" .= (Nothing :: Maybe ZGoOrder)
, "shop" .= (Nothing :: Maybe String)
])
Just c -> do
o <- liftAndCatchIO $ run $ findOwnerById $ xr_owner invReq
@ -664,6 +665,7 @@ routes pipe config = do
(object
[ "reportType" .= (2 :: Integer)
, "order" .= (Nothing :: Maybe ZGoOrder)
, "shop" .= (Nothing :: Maybe String)
])
Just o' -> do
res <-
@ -682,6 +684,7 @@ routes pipe config = do
(object
[ "reportType" .= (2 :: Integer)
, "order" .= (Nothing :: Maybe ZGoOrder)
, "shop" .= (Nothing :: Maybe String)
])
Just xI -> do
if xi_type xI == "ACCREC"
@ -705,6 +708,8 @@ routes pipe config = do
(7 :: Integer)
, "order" .=
(Nothing :: Maybe ZGoOrder)
, "shop" .=
(Nothing :: Maybe String)
])
Just cp -> do
let newOrder =
@ -758,6 +763,7 @@ routes pipe config = do
, "order" .=
toJSON
(fO :: ZGoOrder)
, "shop" .= oname o'
])
else do
status noContent204
@ -767,6 +773,8 @@ routes pipe config = do
(8 :: Integer)
, "order" .=
(Nothing :: Maybe ZGoOrder)
, "shop" .=
(Nothing :: Maybe String)
])
else do
status noContent204
@ -775,6 +783,7 @@ routes pipe config = do
[ "reportType" .= (7 :: Integer)
, "order" .=
(Nothing :: Maybe ZGoOrder)
, "shop" .= (Nothing :: Maybe String)
])
else do
status noContent204
@ -782,6 +791,7 @@ routes pipe config = do
(object
[ "reportType" .= (6 :: Integer)
, "order" .= (Nothing :: Maybe ZGoOrder)
, "shop" .= (Nothing :: Maybe String)
])
else do
status noContent204
@ -789,6 +799,7 @@ routes pipe config = do
(object
[ "reportType" .= (5 :: Integer)
, "order" .= (Nothing :: Maybe ZGoOrder)
, "shop" .= (Nothing :: Maybe String)
])
else do
status noContent204
@ -796,6 +807,7 @@ routes pipe config = do
(object
[ "reportType" .= (1 :: Integer)
, "order" .= (Nothing :: Maybe ZGoOrder)
, "shop" .= (Nothing :: Maybe String)
])
-- Get the xeroaccount code
get "/api/xeroaccount" $ do