diff options
| author | AndriFP <113114423+andrifp@users.noreply.github.com> | 2025-09-11 09:34:25 +0700 |
|---|---|---|
| committer | AndriFP <113114423+andrifp@users.noreply.github.com> | 2025-09-11 09:34:25 +0700 |
| commit | 5ac20ba02d1791864ced47482c8b95920bfed31b (patch) | |
| tree | 94d5415842237ca76850b110656fb6f275bbe562 /indoteknik_custom/models/tukar_guling.py | |
| parent | ac13214fcab7a580b7c9b80faec8cfef684c09aa (diff) | |
| parent | 142f1a37b0d73ea847345428acc4224ff6e49419 (diff) | |
(andri) fix merge
Diffstat (limited to 'indoteknik_custom/models/tukar_guling.py')
| -rw-r--r-- | indoteknik_custom/models/tukar_guling.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/indoteknik_custom/models/tukar_guling.py b/indoteknik_custom/models/tukar_guling.py index d2e00781..6e839bf0 100644 --- a/indoteknik_custom/models/tukar_guling.py +++ b/indoteknik_custom/models/tukar_guling.py @@ -134,7 +134,7 @@ class TukarGuling(models.Model): if not self.val_inv_opt and self.is_has_invoice == True: raise UserError("Kalau sudah ada invoice Return Invoice Option harus diisi!") for rec in self: - if rec.val_inv_opt == 'cancel_invoice' and self.is_has_invoice == True: + if rec.val_inv_opt == 'cancel_invoice' and self.is_has_invoice == True and rec.invoice_id.state != 'cancel': raise UserError("Tidak bisa mengubah Return karena sudah ada invoice dan belum di cancel.") elif rec.val_inv_opt == 'tanpa_cancel' and self.is_has_invoice == True: continue |
