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

View file

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