From b318d73d78763674b86b757efca799e1201f8c62 Mon Sep 17 00:00:00 2001 From: "HOME-LAPTOP\\kshkulev" Date: Sat, 13 Sep 2025 10:51:23 +0900 Subject: [PATCH] Fix bad request --- .../Client/Api/Payload/Bills/ImportPaymentDocumentPayload.cs | 5 +++++ .../Client/Api/Request/Bills/ImportPaymentDocumentRequest.cs | 4 +++- Hcs.TestApp/TestApp/Scenario/BillsScenario.cs | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Hcs.Client/Client/Api/Payload/Bills/ImportPaymentDocumentPayload.cs b/Hcs.Client/Client/Api/Payload/Bills/ImportPaymentDocumentPayload.cs index 30c47d7..f5fb39a 100644 --- a/Hcs.Client/Client/Api/Payload/Bills/ImportPaymentDocumentPayload.cs +++ b/Hcs.Client/Client/Api/Payload/Bills/ImportPaymentDocumentPayload.cs @@ -173,6 +173,11 @@ namespace Hcs.Client.Api.Payload.Bills /// public List chargeInfo; + /// + /// Если true, то выставлен на оплату, иначе - отозван + /// + public bool exposeNotWithdraw; + /// /// Необязательное. Задолженность за предыдущие периоды, руб. /// diff --git a/Hcs.Client/Client/Api/Request/Bills/ImportPaymentDocumentRequest.cs b/Hcs.Client/Client/Api/Request/Bills/ImportPaymentDocumentRequest.cs index 4cd29e2..8ca0eb8 100644 --- a/Hcs.Client/Client/Api/Request/Bills/ImportPaymentDocumentRequest.cs +++ b/Hcs.Client/Client/Api/Request/Bills/ImportPaymentDocumentRequest.cs @@ -220,7 +220,9 @@ namespace Hcs.Client.Api.Request.Bills Items1 = [paymentInformations[entry.paymentInformation].TransportGUID], AccountGuid = entry.accountGuid, PaymentDocumentNumber = entry.paymentDocumentNumber, - Items = [.. chargeInfo] + Items = [.. chargeInfo], + Item = true, + ItemElementName = entry.exposeNotWithdraw ? ItemChoiceType5.Expose : ItemChoiceType5.Withdraw }; if (entry.debtPreviousPeriods.HasValue) diff --git a/Hcs.TestApp/TestApp/Scenario/BillsScenario.cs b/Hcs.TestApp/TestApp/Scenario/BillsScenario.cs index f017095..52dea33 100644 --- a/Hcs.TestApp/TestApp/Scenario/BillsScenario.cs +++ b/Hcs.TestApp/TestApp/Scenario/BillsScenario.cs @@ -51,6 +51,7 @@ namespace Hcs.TestApp.Scenario accountingPeriodTotal = 1862.93M } ], + exposeNotWithdraw = true, debtPreviousPeriods = 3271.16M, advanceBllingPeriod = 0M, totalPayableByPDWithDebtAndAdvance = 3043.95M,