Question: Regarding Reference Number Updating Twice

Regarding Reference Number Updating Twice

hello sir, please sort out this issue . our staff when updating twice same reference number facture not showing error.simply updating? can we make primary key for reference number. if updat

S

sugumar

Asked
hello sir,

please sort out this issue . our staff when updating twice same reference number facture not showing error.simply updating? can we make primary key for reference number. if update twice our payment amount have to pay twice. plz sort out this issue sir.

only allow once facture update only once - reference column we used to update invoice number
  • MS

    Mian Saleem

    Answered
    Hello,

    May I know the reason for duplication? Please ask separate question but if you have already asked that in reply there is no need to ask again. Now I am not sure where to follow :(

    Here is my reply from your other question

    ---

    Reference number is not validated against uniqueness as it's manual input. You can add new validation rule for reference `is_unique[sales.reference_no]` and the full line would be

    ```php
    $this->form_validation->set_rules('reference_no', $this->lang->line('reference_no'), 'required|is_unique[sales.reference_no]');
    ```

    in the sales controller `app/controllers/Sales.php`

    ---

    Now please follow up here.

    Thank you
  • Login to Reply