Skip to content

Commit

Permalink
[VAS-901] feat: introducing pull flag
Browse files Browse the repository at this point in the history
  • Loading branch information
alessio-cialini committed Jul 9, 2024
1 parent fb436ba commit 3efb029
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,15 @@ public class PaymentPosition implements Serializable {
private LocalDate lastUpdatedDate;
@Column(name = "payment_date")
private LocalDateTime paymentDate;

@Builder.Default
@Column(name = "switch_to_expired", columnDefinition = "boolean DEFAULT false")
private Boolean switchToExpired = false;

@Builder.Default
@Column(name = "pull", columnDefinition = "boolean DEFAULT true")
private Boolean pull = true;

@Builder.Default
@NotNull
@Version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
public class PaymentPositionRepository implements PanacheRepository<PaymentPosition> {

private static final String GET_VALID_POSITIONS_BY_TAXCODE_BASE =
"from PaymentPosition AS ppos Where ppos.fiscalCode = ?1 AND ppos.status IN ('VALID', 'PARTIALLY_PAID')";
"from PaymentPosition AS ppos Where ppos.fiscalCode = ?1 " +
"AND ppos.status IN ('VALID', 'PARTIALLY_PAID') AND ppos.pull = true ";

/**
* Recovers a reactive stream of payment positions, using the debtor taxCode, and optionally the dueDate for which at least one
Expand Down

0 comments on commit 3efb029

Please sign in to comment.