Skip to content

Conversation

@vgreb
Copy link
Collaborator

@vgreb vgreb commented Jan 11, 2026

fixes #2107

@vgreb vgreb self-assigned this Jan 11, 2026
@vgreb vgreb force-pushed the refacto/accounting-journal-add-edit branch 2 times, most recently from 72a30ee to 8d9992d Compare January 12, 2026 11:10
@vgreb vgreb force-pushed the refacto/accounting-journal-add-edit branch from 8d9992d to d23e6d7 Compare January 12, 2026 11:13
@vgreb vgreb requested review from Mopolo and stakovicz and removed request for stakovicz January 14, 2026 10:11
* @return CollectionInterface<Event>
*/
public function getAllSortedByName(): CollectionInterface
public function getAllSortedByName($usedInAccountingJournal = false): CollectionInterface
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public function getAllSortedByName($usedInAccountingJournal = false): CollectionInterface
public function getAllSortedByName(bool $usedInAccountingJournal = false): CollectionInterface

public function getNextTransaction(int $transactionId): ?Transaction
{
$query = $this->getQuery('SELECT * FROM compta WHERE (idcategorie = :undeterminedCategoryId OR idevenement = :undeterminedEventId) AND id > :transactionId ORDER BY id ASC LIMIT 1');
$query->setParams(['transactionId' => $transactionId, 'undeterminedCategoryId' => 26, 'undeterminedEventId' => 8]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a AutoQualifier::DEFAULT_CATEGORIE et AutoQualifier::DEFAULT_EVENEMENT pour les ids en dur.

}

public function setPaymentComment(string $paymentComment): self
public function setPaymentComment(?string $paymentComment): self
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Faut faire pareil sur le getter du coup si c'est nullable.

$form = $this->createForm(TransactionType::class, $transaction, ['operation' => 'edit', 'nextTransaction' => $nextTransaction]);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
/** @var SubmitButton|null $passButton */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je pense pas que ce soit utile ça vu qu'il y a un instanceof juste en dessous.

Pareil pour l'autre @var ligne 46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refonte - Trésorerie > Journal > Ajout / Edition

2 participants