Jump to content

Remove Sequential Invoice Number in AddFunds


kbwebsol

Recommended Posts

Dear All,

Every where I Tried to find how remove Sequential Invoice Number when Add Funds because this major issue to maintain invoice number. So, I have created Hook for the same and Sharing to public access.

Just Upload file in  root_ directory/Include/hook.

In case need any customization this part let me know , Also found any error.

 

 

Remove_fund_Invoice.php

Link to comment
Share on other sites

On 11/11/2019 at 11:14, kbwebsol said:

Just Upload file in  root_ directory/Include/hook. 

I think that you mean /includes/hooks 🙂

On 11/11/2019 at 11:14, kbwebsol said:

In case need any customization this part let me know , Also found any error. 

not so much errors, just a couple of suggestions for improvements...

this doesn't matter and so I only mention it for reference, but the = are optional in where statements, but required for joins.

personally, i'd use ->value instead of ->pluck in the line below as that would give you a single value as opposed to a list containing one item that pluck will.

$snv= Capsule::table('tblconfiguration')->where('setting', '=', 'SequentialInvoiceNumberValue')->pluck('value');
Link to comment
Share on other sites

49 minutes ago, brian! said:

I think that you mean /includes/hooks 🙂

not so much errors, just a couple of suggestions for improvements...

this doesn't matter and so I only mention it for reference, but the = are optional in where statements, but required for joins.

personally, i'd use ->value instead of ->pluck in the line below as that would give you a single value as opposed to a list containing one item that pluck will.


$snv= Capsule::table('tblconfiguration')->where('setting', '=', 'SequentialInvoiceNumberValue')->pluck('value');

Yes, I means /includes/hooks. 🙂

Thanks Brian for suggestion I will improve in feature.  

Link to comment
Share on other sites

20 hours ago, kbwebsol said:

Thanks Brian for suggestion I will improve in feature.  

it occurred to me this morning, whilst contemplating the meaning of life(!), that your use of pluck is probably slightly better than using value as it's more backward compatible... untested, but I think your hook as written would also work in older versions when the use of pluck was defined slightly differently, whereas value would only work in releases from the last few years.

... and for something like this, were it's a long standing issue, so there's no knowing which version the user will have.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated