Skip to content

Commit

Permalink
feat: send ITMDES field to sage processor
Browse files Browse the repository at this point in the history
  • Loading branch information
Tiago-Salles authored and igobranco committed Oct 17, 2024
1 parent 261fde8 commit 02973ab
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/billing/mocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ def xml_success_response_mock(data):
<TAB DIM="300" ID="SIH4_1" SIZE="2">
<LIN NUM="1">
<FLD NAME="ITMREF" TYPE="Char">{data["transaction_item_data"]['ITMREF']}</FLD>
<FLD NAME="ITMDES" TYPE="Char">Genérico NAU - Formação Cientifca e Tec. </FLD>
<FLD NAME="ITMDES" TYPE="Char">{data["transaction_item_data"]['ITMDES1']}</FLD>
<FLD NAME="ITMDES1" TYPE="Char">{data["transaction_item_data"]['ITMDES1']}</FLD>
<FLD NAME="YPERIODO" TYPE="Date"></FLD>
<FLD NAME="YPERIODOF" TYPE="Date"></FLD>
Expand Down
1 change: 1 addition & 0 deletions apps/billing/services/processor_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def __generate_items_as_xml(self, items: list[TransactionItem]) -> str:
{items_as_xml}
<LIN>
<FLD NAME="ITMREF">N0001</FLD>
<FLD NAME="ITMDES">{item.description}</FLD>
<FLD NAME="ITMDES1">{item.description}</FLD>
<FLD NAME="QTY">{item.quantity}</FLD>
<FLD NAME="STU">UN</FLD>
Expand Down
2 changes: 1 addition & 1 deletion apps/billing/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def insert_in_dict(item: dict):
else:
client_data[item["@NAME"]] = item["#text"]

if item["@NAME"] in ["ITMREF", "ITMDES1", "QTY", "STU", "GROPRI", "DISCRGVAL1", "VACITM1"]:
if item["@NAME"] in ["ITMREF", "ITMDES", "ITMDES1", "QTY", "STU", "GROPRI", "DISCRGVAL1", "VACITM1"]:
transaction_item_data[item["@NAME"]] = item["#text"]


Expand Down

0 comments on commit 02973ab

Please sign in to comment.