Add Column In Purchases Chart

0

I need help with Adding a Column in Purchases datagridview. I read the instruction manual and I got the process but when I add the new columns look like they don't docent appear in the datagridview.

I did the changes in Index.php and the changes in the Purchases.php too.

PHP CODE::::::::::::::::::

PURCHASES.PHP>>>>>>
$this->load->library('datatables');
if ($warehouse_id) {
$this->datatables
->select("id, DATE_FORMAT(date, '%Y-%m-%d %T') as date, reference_no, container_number, port_of_loading, port_of_discharge,
supplier, status, grand_total, paid, (grand_total-paid) as balance, payment_status, attachment")
->from('purchases')
->where('warehouse_id', $warehouse_id);

    } else {
        $this->datatables
            ->select("id, DATE_FORMAT(date, '%Y-%m-%d %T') as date, reference_no, container_number, port_of_loading, port_of_discharge,   
			supplier, status, grand_total, paid, (grand_total-paid) as balance, payment_status, attachment")
            ->from('purchases');
    }

INDEX.PHP>>>>>>

                    <thead>
                    <tr class="active">
                        <th style="min-width:30px; width: 30px; text-align: center;">
                            <input class="checkbox checkft" type="checkbox" name="check"/>
                        </th>
                        <th><?= lang('date'); ?></th>
                        <th><?= lang('ref_no'); ?></th>
						
                        <th><?= lang('Container_Number'); ?></th>
						
                        <th><?= lang('port_of_loading'); ?></th>							
                        <th><?= lang('port_of_discharge'); ?></th>
						
						
                        <th><?= lang('supplier'); ?></th>
                        <th><?= lang('purchase_status'); ?></th>
                        <th><?= lang('grand_total'); ?></th>
                        <th><?= lang('paid'); ?></th>
                        <th><?= lang('balance'); ?></th>
                        <th><?= lang('payment_status'); ?></th>
                        <th style="min-width:30px; width: 30px; text-align: center;"><i class="fa fa-chain"></i></th>
                        <th style="width:100px;"><?= lang('actions'); ?></th>
                    </tr>
                    </thead>

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

                    <tfoot class="dtFilter">
                    <tr class="active">
                        <th style="min-width:30px; width: 30px; text-align: center;">
                            <input class="checkbox checkft" type="checkbox" name="check"/>
                        </th>
                        <th></th>
                        <th></th>
                        <th></th>
                        <th></th>
                        <th></th>							
                        <th></th>

						
                        <th></th>							
                        <th><?= lang('grand_total'); ?></th>
                        <th><?= lang('paid'); ?></th>
                        <th><?= lang('balance'); ?></th>
                        <th></th>
                        <th style="min-width:30px; width: 30px; text-align: center;"><i class="fa fa-chain"></i></th>
                        <th style="width:100px; text-align: center;"><?= lang('actions'); ?></th>
                    </tr>
                    </tfoot>

I don't know what is missing. can you help me please. I will appreciate it'

Question Resolved For: Stock Manager Advance with Point of Sale Module 0 Votes 9 Answers 256 Views
Asked by Oscar Benitez 3 months ago

0

Answered by Oscar Benitez 3 months ago

This is the Picture

0

Answered by Oscar Benitez 3 months ago

Picture two.

0

Answered by Mian Saleem 3 months ago

Hello,

You need to update the aoColumns for dataTable in the view file index.php

Thank you

0

Answered by Oscar Benitez 3 months ago

But I loss the color Icon. Paid Pending

0

Answered by Oscar Benitez 3 months ago

do you know where I can find the aoColumns Set up. so I can try to make the changes. because I see I losing a lot action and Icon in the screen. now I have # 1 instep the Check Mark.

0

Answered by Oscar Benitez 3 months ago

I loss my CSV Report and that is so important to me. !!!

0

Answered by Mian Saleem 3 months ago

Hello,

The aoColumns option in the initialisation parameter allows you to define details about the way individual columns behave. You can search the index.php

I didn't understand how you loss the report? If you modified any file then please reset it back. If you are not developer, please hire any developer to add the columns for you.

Thank you

0

Answered by Oscar Benitez 3 months ago

I did the correction, the only thing was to add more NULLs to the Index. php now is working fine. thanks you for your help you give a clue with your answer.
EX=>
"aoColumns": [{"bSortable": false,"mRender": checkbox}, {"mRender": fld},
null, null, null, null, null, null, null, null, {"mRender": row_status}, {"mRender": currencyFormat}, {"mRender": currencyFormat},
{"mRender": currencyFormat}, {"mRender": pay_status}, {"bSortable": false,"mRender": attachment},
{"bSortable": false}],
'fnRowCallback': function (nRow, aData, iDisplayIndex) {

0

Answered by Mian Saleem 3 months ago

I am glad that you have managed it.

We use Cookies

We use cookies to ensure that we give you the best experience on our website. By continuing to browse the site you are agreeing to our use of cookies.