Customize Profit and loss. Help me with

I just create a customize profit and loss script report and in prepare_data function when I assign value outside the loop and when I print the value it doesn’t have the same value as the outside loop. Please help.

@Pejay provide more info and screenshots

1 Like

Thank you @bahaou for your response.


here is the message for the first gross profit


and here is the message for the second gross profit

If you print this the value is zero but if you print outside the if statement it has a total income value