We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5686138 commit 3c89a24Copy full SHA for 3c89a24
src/Processor.php
@@ -378,6 +378,10 @@ public function entry_post_save( $lead, $form ) {
378
}
379
380
$line->set_total_amount( new Money( $value, $currency ) );
381
+
382
+ if ( $value->get_value() < 0 ) {
383
+ $line->set_type( PaymentLineType::DISCOUNT );
384
+ }
385
386
387
if ( array_key_exists( 'quantity', $product ) ) {
@@ -411,6 +415,10 @@ public function entry_post_save( $lead, $form ) {
411
415
$value = $value->multiply( Number::from_mixed( $line->get_quantity() ) );
412
416
413
417
418
419
420
421
414
422
423
424
0 commit comments