frame

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Register

adding amount paid to quote also

0

Hi any idea how i can add paid/deposit to quote ??

the attached images are from invoice, but i want that also at quote, any ideA?


thanks in advance !!

1.jpg 146.6K
2.jpg 155.6K

Comments

  • 0

    @AskinSavascisi said:
    Another bug :

    The invoice/ purchase counter is the same.

    let's say if i make an invoice 1, and if I go to purchase order the count is 2, then go back to invoice its 3 :tired_face:

    and any idea if i can leave the accounter at a custom number? since IRL im at invoice 1043 or something :) and change from prefix to suffic? like 1043#2017

    Hi, open application/librairies/M_manager.php and locate 'countOverdueInvoices' => (!count_invoices('Overdue')) ? '' : count_invoices('Overdue')
    add a new var 'countOverduePurchases' and locate the count_invoices function in functions_helper and add a where clause

  • 0
    edited July 16

    Another bug :

    The invoice/ purchase counter is the same.

    let's say if i make an invoice 1, and if I go to purchase order the count is 2, then go back to invoice its 3 :tired_face:

    and any idea if i can leave the accounter at a custom number? since IRL im at invoice 1043 or something :) and change from prefix to suffic? like 1043#2017

  • 0
    Hi, you need a where clause in the get_invoices() method. `AND is_purchase_order = 0`
  • 0

    Hi, if i give in a purchase order they are visible in purchase_index as it should be but also in invoice_index.

    how can i filter that?

  • 0

    when adding a purchase order , it's also showing up under invoices tab, how to disable that?

  • 0
    null
    You're right im allready taking notes of files and path's :) thats why im asking xD
  • 0

    @AskinSavascisi said:
    Which file was it for pdf export ? Lets say invoice_tpl1 only for purchase and tpl4 for invoice

    You should keep somewhere the app structure ;)
    Pdf view controllers are in application/controllers/Viewinvoice.php or Viewquote.php

  • 0
    Which file was it for pdf export ? Lets say invoice_tpl1 only for purchase and tpl4 for invoice
  • 0

    @Developer said:

    @AskinSavascisi said:
    hi, we forgot to add this code to application/modules/invoices/controllers/invoices.php

    and which file was it again for invoice/purchase export template? e.g: invoice_tpl1 default for purchase and invoice_tpl3 for invoice

    public function edit_purchase()
    {
    $id = _dID($_REQUEST['id']);
    $view_data = array(
    'user_language' => get_option('user_language', 'users_options'),
    'invoices' => get_invoice_by_number($id),
    'invoice_items' => get_invoiced_items($id),
    'clients' => json_encode(clients()),
    'payment_fees' => null !== get_invoice_charges($id) ? get_invoice_charges($id) : floatval(0),
    'charges_sku' => null !== get_charges_sku($id) ? get_charges_sku($id) : generate_sku(),
    'invoice_status' => array(
    'Draft' => ucfirst(('option_draft')),
    'Unpaid' => ucfirst(
    ('option_unpaid')),
    'Paid' => ucfirst(('option_paid')),
    'Open' => ucfirst(
    ('label_opened')),
    'Paidout' => ucfirst(('label_paidout')),
    'Failed' => ucfirst(
    ('is_failed')),
    'Expired' => ucfirst(('label_expired')),
    'Refunded' => ucfirst(
    ('label_refunded')),
    'Pending' => ucfirst(('label_pending')),
    'Charged_back' => ucfirst(
    ('label_charged_back')),
    'Overdue' => ucfirst(('option_overdue')),
    'Cancelled' => ucfirst(
    ('option_cancelled'))
    ),
    'pay_type' => array(
    '1' => __('option_once'),
    '2' => __('option_weekly'),
    '3' => __('option_biweekly'),
    '4' => __('option_monthly'),
    '5' => __('option_yearly'),
    )
    );
    $this->view_data['content'] = $this->load->view('edit_purchase_form', $view_data, true);
    $this->load->view('templates/layout', $this->view_data);
    }

    Hi, in the first step you duplicated the edit() method and renamed it to edit_purchase() Right ?
    Because invoices and quotes/purchase have to accessible, they are out of admin scope in application/controllers/Viewinvoice.php

    yes, i duplicated and renamed it afterward

  • 0

    @AskinSavascisi said:
    hi, we forgot to add this code to application/modules/invoices/controllers/invoices.php

    and which file was it again for invoice/purchase export template? e.g: invoice_tpl1 default for purchase and invoice_tpl3 for invoice

    public function edit_purchase()
    {
    $id = _dID($_REQUEST['id']);
    $view_data = array(
    'user_language' => get_option('user_language', 'users_options'),
    'invoices' => get_invoice_by_number($id),
    'invoice_items' => get_invoiced_items($id),
    'clients' => json_encode(clients()),
    'payment_fees' => null !== get_invoice_charges($id) ? get_invoice_charges($id) : floatval(0),
    'charges_sku' => null !== get_charges_sku($id) ? get_charges_sku($id) : generate_sku(),
    'invoice_status' => array(
    'Draft' => ucfirst(('option_draft')),
    'Unpaid' => ucfirst(
    ('option_unpaid')),
    'Paid' => ucfirst(('option_paid')),
    'Open' => ucfirst(
    ('label_opened')),
    'Paidout' => ucfirst(('label_paidout')),
    'Failed' => ucfirst(
    ('is_failed')),
    'Expired' => ucfirst(('label_expired')),
    'Refunded' => ucfirst(
    ('label_refunded')),
    'Pending' => ucfirst(('label_pending')),
    'Charged_back' => ucfirst(
    ('label_charged_back')),
    'Overdue' => ucfirst(('option_overdue')),
    'Cancelled' => ucfirst(
    ('option_cancelled'))
    ),
    'pay_type' => array(
    '1' => __('option_once'),
    '2' => __('option_weekly'),
    '3' => __('option_biweekly'),
    '4' => __('option_monthly'),
    '5' => __('option_yearly'),
    )
    );
    $this->view_data['content'] = $this->load->view('edit_purchase_form', $view_data, true);
    $this->load->view('templates/layout', $this->view_data);
    }

    Hi, in the first step you duplicated the edit() method and renamed it to edit_purchase() Right ?
    Because invoices and quotes/purchase have to accessible, they are out of admin scope in application/controllers/Viewinvoice.php

  • 0

    hi, we forgot to add this code to application/modules/invoices/controllers/invoices.php

    and which file was it again for invoice/purchase export template? e.g: invoice_tpl1 default for purchase and invoice_tpl3 for invoice

    public function edit_purchase()
    {
    $id = _dID($_REQUEST['id']);
    $view_data = array(
    'user_language' => get_option('user_language', 'users_options'),
    'invoices' => get_invoice_by_number($id),
    'invoice_items' => get_invoiced_items($id),
    'clients' => json_encode(clients()),
    'payment_fees' => null !== get_invoice_charges($id) ? get_invoice_charges($id) : floatval(0),
    'charges_sku' => null !== get_charges_sku($id) ? get_charges_sku($id) : generate_sku(),
    'invoice_status' => array(
    'Draft' => ucfirst(('option_draft')),
    'Unpaid' => ucfirst(
    ('option_unpaid')),
    'Paid' => ucfirst(('option_paid')),
    'Open' => ucfirst(
    ('label_opened')),
    'Paidout' => ucfirst(('label_paidout')),
    'Failed' => ucfirst(
    ('is_failed')),
    'Expired' => ucfirst(('label_expired')),
    'Refunded' => ucfirst(
    ('label_refunded')),
    'Pending' => ucfirst(('label_pending')),
    'Charged_back' => ucfirst(
    ('label_charged_back')),
    'Overdue' => ucfirst(('option_overdue')),
    'Cancelled' => ucfirst(
    ('option_cancelled'))
    ),
    'pay_type' => array(
    '1' => __('option_once'),
    '2' => __('option_weekly'),
    '3' => __('option_biweekly'),
    '4' => __('option_monthly'),
    '5' => __('option_yearly'),
    )
    );
    $this->view_data['content'] = $this->load->view('edit_purchase_form', $view_data, true);
    $this->load->view('templates/layout', $this->view_data);
    }

  • 0

    @Developer said:
    I am working on the calendar

    super can't wait for that feature, thanks for the filepath btw :)

  • 0

    @AskinSavascisi said:
    which js file was it for active menu tab?

    root/oc_contents/theme/scripts/mmanager/mmanager.js

  • 0

    which js file was it for active menu tab?

  • 0

    @AskinSavascisi said:

    @Developer said:

    @AskinSavascisi said:

    @Developer said:

    @AskinSavascisi said:

    @Developer said:

    @AskinSavascisi said:
    Hey Eric,

    when I click on the purchase order on menu im getting a blank page? what did i do wrong? :/

    I'm also having a problem on invoice tab. i'm getting a blank page :disappointed:

    Available for teamviewer ?

    EDIT: it was the edit() function, i renamed it to editt() and it fixed the blank page.

    so i have now 2 edit() functions??

    Sorry, you should name it edit_purchase()

    ok i'm ready for the second part :)

    Ready now now or have a rest and continue tomorrow ? ;)

    did you have enough rest? :smiley:

    Do you see the attached file ? The forum is not well organized !

  • 0

    @AskinSavascisi said:

    @Developer said:

    @AskinSavascisi said:

    @Developer said:

    @AskinSavascisi said:

    @Developer said:

    @AskinSavascisi said:
    Hey Eric,

    when I click on the purchase order on menu im getting a blank page? what did i do wrong? :/

    I'm also having a problem on invoice tab. i'm getting a blank page :disappointed:

    Available for teamviewer ?

    EDIT: it was the edit() function, i renamed it to editt() and it fixed the blank page.

    so i have now 2 edit() functions??

    Sorry, you should name it edit_purchase()

    ok i'm ready for the second part :)

    Ready now now or have a rest and continue tomorrow ? ;)

    did you have enough rest? :smiley:

    Lol, I was adding the file. We are synced !

  • 0

    @Developer said:

    @AskinSavascisi said:

    @Developer said:

    @AskinSavascisi said:

    @Developer said:

    @AskinSavascisi said:
    Hey Eric,

    when I click on the purchase order on menu im getting a blank page? what did i do wrong? :/

    I'm also having a problem on invoice tab. i'm getting a blank page :disappointed:

    Available for teamviewer ?

    EDIT: it was the edit() function, i renamed it to editt() and it fixed the blank page.

    so i have now 2 edit() functions??

    Sorry, you should name it edit_purchase()

    ok i'm ready for the second part :)

    Ready now now or have a rest and continue tomorrow ? ;)

    did you have enough rest? :smiley:

  • 0

    @AskinSavascisi said:

    @Developer said:

    @AskinSavascisi said:

    @Developer said:

    @AskinSavascisi said:
    Hey Eric,

    when I click on the purchase order on menu im getting a blank page? what did i do wrong? :/

    I'm also having a problem on invoice tab. i'm getting a blank page :disappointed:

    Available for teamviewer ?

    EDIT: it was the edit() function, i renamed it to editt() and it fixed the blank page.

    so i have now 2 edit() functions??

    Sorry, you should name it edit_purchase()

    ok i'm ready for the second part :)

    Ready now now or have a rest and continue tomorrow ? ;)

  • 0

    @Developer said:

    @AskinSavascisi said:

    @Developer said:

    @AskinSavascisi said:
    Hey Eric,

    when I click on the purchase order on menu im getting a blank page? what did i do wrong? :/

    I'm also having a problem on invoice tab. i'm getting a blank page :disappointed:

    Available for teamviewer ?

    EDIT: it was the edit() function, i renamed it to editt() and it fixed the blank page.

    so i have now 2 edit() functions??

    Sorry, you should name it edit_purchase()

    ok i'm ready for the second part :)

  • 0

    @AskinSavascisi said:

    @Developer said:

    @AskinSavascisi said:
    Hey Eric,

    when I click on the purchase order on menu im getting a blank page? what did i do wrong? :/

    I'm also having a problem on invoice tab. i'm getting a blank page :disappointed:

    Available for teamviewer ?

    EDIT: it was the edit() function, i renamed it to editt() and it fixed the blank page.

    so i have now 2 edit() functions??

    Sorry, you should name it edit_purchase()

  • 0

    @Developer said:

    @AskinSavascisi said:
    Hey Eric,

    when I click on the purchase order on menu im getting a blank page? what did i do wrong? :/

    I'm also having a problem on invoice tab. i'm getting a blank page :disappointed:

    Available for teamviewer ?

    EDIT: it was the edit() function, i renamed it to editt() and it fixed the blank page.

    so i have now 2 edit() functions??

  • 0

    @AskinSavascisi said:
    Hey Eric,

    when I click on the purchase order on menu im getting a blank page? what did i do wrong? :/

    I'm also having a problem on invoice tab. i'm getting a blank page :disappointed:

    Available for teamviewer ?

  • 0
    edited July 10

    Hey Eric,

    when I click on the purchase order on menu im getting a blank page? what did i do wrong? :/

    I'm also having a problem on invoice tab. i'm getting a blank page :disappointed:

    EDIT: it was the edit() function, i renamed it to editt() and it fixed the blank page.

    so i have now 2 edit() functions??

  • 0

    @AskinSavascisi said:
    thanks for thext file. where should i past the hidden field at the end of the file?

    Anywhere before the closing

  • 0

    thanks for thext file. where should i past the hidden field at the end of the file?

  • 0

    @AskinSavascisi said:
    hi could you post the code to somewhere where i can see the RAW of it?? its quite confusing with those "red" / highlighting?

    and should i copy the files in the same folder? or make a folder for it?

    You have the code in the attachment edit.txt in one my comment. Yes copy in the same folder for add/edit and the same file for functions

  • 0

    hi could you post the code to somewhere where i can see the RAW of it?? its quite confusing with those "red" / highlighting?

    and should i copy the files in the same folder? or make a folder for it?

  • 0

    I see that the code is not correctly rendered by the forum. Here is a text file

  • 0
    edited July 10

    @AskinSavascisi
    Hi,
    I saw somewhere Purchase Order. This is a feature I will implement.
    What you try to do is cool, but the way you are doing can be confusing because Quotes become invoices when they are approved. They don't have Amount Paid or Transactions fields. So you will need lot of functions and javascript to achieve this.

    What you should do ?
    First, let's see how invoices work.
    1. You have a create_invoice/edit_invoice view files. These files post all its data to invoices/controllers/Ajax.php/create_invoice() function for create or update
    2. When all fields are ok, the script writes in oc_invoices table AND oc_invoiceitems
    3. When a transaction occurs, a third table is written, oc_transactions where all financial data are saved.

    So, to achieve your project.
    1. First duplicate create_invoice_form.php/edit_invoice_form.php view files and rename them to create_purchase_form.php/ edit_purchase_form.php
    2. Add a hidden field "is_purchase_order" in create_purchase/edit_purchase view files: <input type="hidden" name="is_purchase_order" value="1">
    2. Edit the create_invoice() function in the Ajax.php $invoiceTable['is_purchase_order'] => $this->input->post('is_purchase_order')
    3. Alter the oc_invoices table with this query ALTER TABLE oc_invoices ADD is_purchase_order tinyint(1) DEFAULT 04. In modules/invoices/Invoices.php duplicate the create_invoice() and edit this waypublic function create_purchase()
    {
    $data = array(
    'clients' => clients()
    );
    $this->view_data['content'] = $this->load->view('create_purchase_form', $data, true);
    $this->load->view('templates/layout', $this->view_data);
    }5. Duplicate the edit() function and edit this line$this->view_data['content'] = $this->load->view('edit_invoice_form', $view_data, true);to$this->view_data['content'] = $this->load->view('edit_purchase_form', $view_data, true);6. Open application/modules/templates/views/layout.php and add a link


    " class="nav-link nav-toggle">

    PURCHASE ORDER

    `
    Now, you get the invoice form for purchase order. This form will post in the same function as invoice, this way you don't need to edit core functions. Your 'is_purchase_order' will be used to query the same table with a where clause for invoices list.

    Let me know if you are ready for the last steps: display the purchases order :smiley:

Sign In or Register to comment.

m'Manager

| Let's Build Together a Great App !
If you are a happy user, send me a coffee.
2015 - 2107 © m'Manager.
Powered by VanillaForums, Designed by ThemeSteam

Recent Donations

  • Patricia from Sjopz.com - 10€
  • AskinSavascisi from wolftech.com - 3€
  • Get In Touch