partabsaifzakir

partabsaifzakir

Member Since 1 Month Ago

Experience Points 2,440
Experience
Level
Lessons Completed 1
Lessons
Completed
Best Reply Awards 0
Best Answer
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • Chatty Cathy Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

17 Nov
2 days ago

partabsaifzakir left a reply on Can't See All Option In Dropdown Because Of Pagination

@JLRDW - Could you send me some links, i watched some tutorials, apply on my code but its not working

16 Nov
3 days ago

partabsaifzakir left a reply on Can't See All Option In Dropdown Because Of Pagination

@jlrdw - @cronix i did to do it with auto complete but failed many time could you guide me some how.

partabsaifzakir left a reply on Can't See All Option In Dropdown Because Of Pagination

@JLRDW - Yes Brother u r right i think i have to go with autocomplete feature, Lets try that.

partabsaifzakir left a reply on Can't See All Option In Dropdown Because Of Pagination

@CRONIX - Brother if i did vendor->all() i have a component for vendor in which i have a table of vendor data i have to paginate that. also i have a dropdown of ticket_invoice_noin another component where i'm also getting only 10 results coz i'm paginating Ticket->paginate(10). I think i have to go with autocomplete feature, can u help me with that ?

15 Nov
4 days ago

partabsaifzakir started a new conversation Can't See All Option In Dropdown Because Of Pagination

I'm using Laravel 5.7 & VueJs 2.5.* ...

I did pagination for my invoice as well as vendor table. i have a create invoice form in which i have dropdown option for selecting vendors, i have more than 20 vendors, after doing pagination i see in my form i have only 10 vendors in my dropdown option... I don't know how to fix this issue.

Did Pagination Like this:

In HTML

    <!--PAGINATION FOR VENDORS TABLE -->
    <pagination :data="ticketInvoices" @pagination-change-page="getResults"></pagination>

    <!--PAGINATION FOR VENDORS TABLE -->
    <pagination :data="vendors" @pagination-change-page="getResults"></pagination>

methods:{} of both pagination

    //METHOD FOR INVOICE
    getResults(page = 1) {
      axios.get("api/ticket-invoice?page=" + page).then(response => {
        this.ticketInvoices = response.data;
      });
    },

    //METHOD FOR VENDOR
    getResults(page = 1) {
      axios.get("api/vendor?page=" + page).then(response => {
        this.vendors = response.data;
      });
    },

InvoiceController & VendorController

    /*Invoice Controller*/
    class TicketInvoiceController extends Controller
    {
        public function index()
        {
            $ticketInvoices = TicketInvoice::orderBy('created_at', 'desc')->paginate(10);
            return $ticketInvoices;
        }

    /*Invoice Controller*/
    class VendorController extends Controller
    {
        public function index()
        {
            $vendor = Vendor::paginate(10);
            return $vendor;
        }

Before Pagination enter image description here

After Pagination enter image description here

partabsaifzakir left a reply on How To Search With Vendor Name As Well ???

@SHUSHKIN - Thanks Brother It's Working.... :)

partabsaifzakir left a reply on How To Search With Vendor Name As Well ???

@ZOROASTER - Can u help me with some code if u don't mind ?

partabsaifzakir left a reply on How To Search With Vendor Name As Well ???

@zoroaster Brother vendor_company_name is not a column in my ticket-invoices table, it's in my vendors table, i think the problem is in my ticketInvoicecontroller, but i don't know how to fix that.

partabsaifzakir started a new conversation How To Search With Vendor Name As Well ???

I'm using Laravel 5.7 & VueJs 2.5.* ...

I have a table with invoice data in it and a invoice is related to the vendor so i also displayed the vendor name in the table, i'm using search feature it works when i search invoice number, but when i want to search with vendor name, its not working.

i did something like this:

I DID THIS IN SCRIPT

    mounted() {
        Fire.$on("searching", () => {
          let query = this.$parent.search;
          axios
            .get("api/findVTI?q=" + query)
            .then(data => {
              this.ticketInvoices = data.data;
            })
            .catch();
        });

I MADE A ROUTE

Route::get('findVTI', 'API\[email protected]');

IN MY INVOICE CONTROLLER I DID THIS

        public function searchVTI()
        {
            if($search = \Request::get('q')){
                $VTI = TicketInvoice::where(function($query) use ($search){
                    $query->where('ticket_invoice_no','LIKE',"%$search%")
                          ->orWhere('ticket_invoice_grand_total','LIKE',"%$search%")
                          ->orWhere('vendor_company_name','LIKE',"%$search%");
                })->paginate(10);
            }else{
                return TicketInvoice::paginate(10);
            }
            return $VTI;
        }

When i write this line: ->orWhere('vendor_company_name','LIKE',"%$search%"); i got an error in console that, vendor_company_name does not exist in ticket_invoices.

I play around with many thing but didn't succeed...

Image For Better Understanding: enter image description here

14 Nov
5 days ago

partabsaifzakir left a reply on DELETD

Deleted

partabsaifzakir left a reply on How To Display My Invoice Data In Invoice Template

@robstar

I did something like this, it's working for me, can u just review it for me:

<router-link> to the Invoice View component

<router-link v-bind:to="{name: 'ctInvoiceView', params: {id: ctInvoice.id}}">
  <i class="fas fa-eye fa-lg text-blue"></i>
</router-link>

Getting Data of Specific Invoice ID Like This:

created: function() {
  axios
    .get("/api/ct-invoice/" + this.$route.params.id)
    .then(({
      data
    }) => {
      console.log(data);
      this.form = new Form(data);
    })
    .catch(error => {
      console.log(error.response);
    });
},
09 Nov
1 week ago

partabsaifzakir started a new conversation Need To Display My Invoice Data In Invoice Template

I'm using Laravel 5.7 & VueJs 2.5.* ...

I have invoices table, i need to display specific invoice in a new component, so user can see whatever invoice he wants or print that invoice.

I don't know how to do that, i'm just playing around, if you could help me out, i'll be very grateful to you.

<router-link> to the component

<router-link to="/ct-invoice-view" @click="openInvoice(ctInvoice)">
  <i class="fas fa-eye fa-lg text-blue"></i>
</router-link>

Displaying Customer information here like this:

<div class="col-sm-4 invoice-col">
  <address v-for="ctInvoice in ctInvoices" :key="ctInvoice.id">
     <strong>Customer Info</strong><br>
     Name: <span>{{ ctInvoice.customer.customer_name }}</span>

Invoice view component data() & method{}

data() {
    return {
      ctInvoices: {},
      customers: null
    };
  },
  methods: {
    openInvoice(ctInvoice) {
      axios
        .get("api/ct-invoice/show/" + this.viewInvoice)
        .then(({
          data
        }) => (this.ctInvoices = data.data));
    },

Image for Better Understanding enter image description here

enter image description here

enter image description here

06 Nov
1 week ago

partabsaifzakir left a reply on Fetch Data And Populate In Text Boxes If Selected Dropdown Option

@tykus

Yes! Everything is working as it should be.....

Where were you before ... ??? I was trying to solve this issue for 7 days......

partabsaifzakir left a reply on Fetch Data And Populate In Text Boxes If Selected Dropdown Option

@tykus Yes! i'm getting the data now

enter image description here

I can now do some changes and save data to the DB now ????

partabsaifzakir left a reply on Fetch Data And Populate In Text Boxes If Selected Dropdown Option

@tykus sorry to bother you at this time, i'll be waiting for you. Thank You.

partabsaifzakir left a reply on Fetch Data And Populate In Text Boxes If Selected Dropdown Option

@tykus sorry to bother you at this time, i'll be waiting for you. Thank You.

partabsaifzakir left a reply on Fetch Data And Populate In Text Boxes If Selected Dropdown Option

@tykus could you help me to get me out from this issue please ?

partabsaifzakir left a reply on Fetch Data And Populate In Text Boxes If Selected Dropdown Option

@tykus could you help me to finish this issue please ?

05 Nov
2 weeks ago

partabsaifzakir left a reply on Fetch Data And Populate In Text Boxes If Selected Dropdown Option

@tykus Is it okay? is that what you need to watch ?

partabsaifzakir left a reply on Fetch Data And Populate In Text Boxes If Selected Dropdown Option

@tykus

Here are some <input> fields of ctInvoice & ctInvoiceItems.

<form @submit.prevent="editmode ? updateCtInvoice() : createCtInvoice()">
  <div class="modal-body">
    <div class="row">

      <!-- =====VENDOR INVOICE SELECTION===== -->
      <select id="ticket_invoice_no" v-model="selectedTicketInvoiceId" @change="getRecord" name="ticket_invoice_no" type="text" class="form-control">
        <option v-for="ticketInvoice in ticketInvoices" :key="ticketInvoice.id" :value="ticketInvoice.id">{{ ticketInvoice.ticket_invoice_no }}</option>
      </select>

      <!-- =====CUSTOMER TICKET INVOICE NUMBER===== -->
      <input v-model="form.ct_invoice_no" type="text" name="ct_invoice_no" class="form-control">

      <!-- =====CUSTOMER TICKET INVOICE ITEMS===== -->
      <tbody>
        <tr v-for="(ctInvoiceItem, key) in form.ctInvoiceItems" :key="key">
          <!--Passenger Name-->
          <td>
            <input v-model="ctInvoiceItem.ct_passenger_name" size="40" type="text" name="ct_passenger_name" class="table-control form-control">
          </td>

          <!--Ticket No.-->
          <td>
            <input v-model="ctInvoiceItem.ct_ticket_no" size="24" type="text" name="ct_ticket_no" class="table-control form-control">
          </td>

          <!--Flight No.-->
          <td>
            <input v-model="ctInvoiceItem.ct_flight_no" size="7" type="text" name="ct_flight_no" class="table-control form-control">
          </td>
      </tbody>

partabsaifzakir left a reply on Fetch Data And Populate In Text Boxes If Selected Dropdown Option

@tykus

I did this: $ticketInvoices->ticketInvoiceItems->map(function ($item)

Now i'm not getting error 500, My Vue Dev Tool form is like this after i select options:

enter image description here

Still fields are not filling with data.

partabsaifzakir left a reply on Fetch Data And Populate In Text Boxes If Selected Dropdown Option

@tykus

A ticketInvoice hasMany ticketInvoiceItems, same forctInvoicehasManyctInvoiceItems` i made a model for both of them and make relation between them.

Here is their models...

ticketInvoice Model: enter image description here

ticketInvoiceItems Model: enter image description here

partabsaifzakir left a reply on Fetch Data And Populate In Text Boxes If Selected Dropdown Option

@tykus yes i'm trying to set controller wait, i'll let you know.

partabsaifzakir left a reply on Fetch Data And Populate In Text Boxes If Selected Dropdown Option

@tykus

Could you show me some code, how to do that, because i don't understand or speak English very well, but maybe i understand code.

I think i'm close, because of you, just need more help to finish this.

One more thing when i select option, i see my Vue dev tool, all the ticketInvoice details fills in form, but data is not actually filling in the fields so i could do some changes in the data and finally store it in DB as a customerInvoice.

Vue Dev Tool BEFORE SELECTING OPTION: enter image description here

Vue Dev Tool AFTER SELECTING OPTION: enter image description here

BUT NOT FILLING FIELDS: enter image description here

partabsaifzakir left a reply on Fetch Data And Populate In Text Boxes If Selected Dropdown Option

@tykus

I just dont understand this: "Lastly, make sure that the keys in the data JSON object map to the same keys in the components form property."

partabsaifzakir left a reply on Fetch Data And Populate In Text Boxes If Selected Dropdown Option

@tykus

First: when i select option i get like this in my console network: enter image description here

Second: i did this: dump($id, $ticketInvoices); in my fetch(). after running command: php artisan dump-server. When i select option i get TicketInvoice Its Items and all its details. enter image description here

Third: When i did this: console.log(data); after then, i get this in my console after selecting option: enter image description here

partabsaifzakir left a reply on Fetch Data And Populate In Text Boxes If Selected Dropdown Option

@tykus

First: when i select option i get like this in my console network: enter image description here

Second: i did this: dump($id, $ticketInvoices); in my fetch(). after running command: php artisan dump-server. When i select option i get TicketInvoice Its Items and all its details.

Third: When i did this: console.log(data); after then, i get this in my console after selecting option:

partabsaifzakir left a reply on Fetch Data And Populate In Text Boxes If Selected Dropdown Option

@tykus

First: when i select option i get like this in my console network:

https://i.stack.imgur.com/Z5jA8.png

Second: i did this: dump($id, $ticketInvoices); in my fetch(). after running command: php artisan dump-server. When i select option i get TicketInvoice Its Items and all its details.

https://i.stack.imgur.com/gl65t.png

Third: When i did this: console.log(data); after then, i get this in my console after selecting option:

partabsaifzakir left a reply on Fetch Data And Populate In Text Boxes If Selected Dropdown Option

@tykus

First: when i select option i get like this in my console network:

https://i.stack.imgur.com/Z5jA8.png

Second: i did this: dump($id, $ticketInvoices); in my fetch(). after running command: php artisan dump-server. When i select option i get TicketInvoice Its Items and all its details.

https://i.stack.imgur.com/gl65t.png

Third: When i did this: console.log(data); after then, i get this in my console after selecting option:

partabsaifzakir left a reply on Fetch Data And Populate In Text Boxes If Selected Dropdown Option

@tykus

First: when i select option i get like this in my console network: enter image description here

Second: i did this: dump($id, $ticketInvoices); in my fetch(). after running command: php artisan dump-server. When i select option i get TicketInvoice Its Items and all its details. enter image description here

Third: When i did this: console.log(data); after then, i get this in my console after selecting option:

partabsaifzakir left a reply on Fetch Data And Populate In Text Boxes If Selected Dropdown Option

@tykus

First: when i select option i get like this in my console network: enter image description here

Second: i did this: dump($id, $ticketInvoices); in my fetch(). after running command: php artisan dump-server. When i select option i get TicketInvoice Its Items and all its details. enter image description here

Third: When i did this: console.log(data); after then, i get this in my console after selecting option: enter image description here

partabsaifzakir left a reply on Fetch Data And Populate In Text Boxes If Selected Dropdown Option

i did exactly as u showed me but i'm getting this error in console : Cannot read property 'has' of undefined", also my form is not auto-fill with the data, as i want.

partabsaifzakir left a reply on Fetch Data And Populate In Text Boxes If Selected Dropdown Option

@tykus I have two invoices VendorInvoice and CustomerInvoice… I created my VendorInvoice, fill all data and store in DB… But when i want to create CustomerInvoice, i need the same data which i filled and stored in DB for VendorInvoice. So when i create CustomerInvoice, I have a options of VendorInvoice _no, by selecting any option CustomerInvoice form should auto fill with the VendorInvoice & VendorInvoiceItems data. So i don’t have to fill same data by myself again in CustomerInvoice… Thats what i want.... Please help me out.

partabsaifzakir started a new conversation Fetch Data And Populate In Text Boxes If Selected Dropdown Option

I'm using Laravel 5.7 & VueJs 2.5.* ...

I want to autofill my form textboxes with the values in database when i select dropdown option. i've been finding solution since days but didn't get any success. I'm very new at this....

If anyone could save to get me out from this issue i'll be very grateful. Thank You.

This is what i'm doing: My <select>:

    <select id="ticket_invoice_no" @change="getRecord" name="ticket_invoice_no">
      <option v-for="ticketInvoice in ticketInvoices" :key="ticketInvoice.id" :value="ticketInvoice.id">{{ ticketInvoice.ticket_invoice_no }}</option>

Someone told me to do something like this so i'm doing this, don't know what:

    getRecord: function(e) {
      let id = e.target.value;
      axios
        .get('api/ticket-invoice/' + id)
        .then(response => {
        
          console.log(e.target.value, "Target id");
          console.log(id, "Invoice id i clicked is");
          console.log(response, "Response data");'
          
          this.form = ticket-invoice.fetch;
        })
        .catch(error => {
          console.log(error.response);
        });
    },

Route:

    Route::get('ticket-invoice/{ticket_invoice}', 'API\[email protected]') -> name('ticket-invoice.fetch');

method:{}

    public function fetch($id) {
      $ticketInvoices = TicketInvoice::findOrFail($id);
      return $ticketInvoices;
    }

My data():

    data() {
      return {
        editmode: true,
        ticketInvoices: {},
        ctInvoices: {},
        customers: null,
        form: new Form({
          id: "",
          customer_id: "",
          ct_invoice_no: "",
          ct_invoice_date: "",
          ct_invoice_fares_total: 0,
          ct_invoice_grand_total: 0,

          ctInvoiceItems: [{
            id: "",
            ct_invoice_id: "",
            ct_passenger_name: "",
            ct_fares: 0,
            ct_sub_total: 0
          }]
        })
      };
    },

partabsaifzakir started a new conversation Database Value In Text Boxes If Dropdown Option Selected.

I'm using Laravel 5.7 & VueJs 2.5.* ...

I want to autofill my form textboxes with the values in database when i select dropdown option. i've been finding solution since days but didn't get any success. I'm very new at this....

If anyone could save to get me out from this issue i'll be very grateful. Thank You.

Here is my HTML dropdown and some textboxes:

<!-- =====VENDOR INVOICE DROPDOWN SELECTION===== -->
<select id="ticket_invoice_no" v-model="selectedInvoice" name="ticket_invoice_no" type="text" class="form-control">
  <option v-for="ticketInvoice in ticketInvoices" :key="ticketInvoice.id" :value="ticketInvoice.id">{{ ticketInvoice.ticket_invoice_no }}</option>
</select>

<!-- =====CUSTOMER TICKET INVOICE NUMBER===== -->
<input v-model="form.ct_invoice_no" type="text" name="ct_invoice_no" class="form-control">

<!-- =====CUSTOMER INVOICE DATE===== -->
<input v-model="form.ct_invoice_date" type="date" name="ct_invoice_date" class="form-control">

My data() in vuejs:

  data() {
    return {
      editmode: true,
      ticketInvoices: {},
      ctInvoices: {},
      customers: null,
      form: new Form({
        id: "",
        customer_id: "",
        ct_invoice_no: "",
        ct_invoice_date: "",
        ct_invoice_fares_total: 0,
        ct_invoice_grand_total: 0,

        ctInvoiceItems: [
          {
            id: "",
            ct_invoice_id: "",
            ct_passenger_name: "",
            ct_fares: 0,
            ct_sub_total: 0
          }
        ]
      })
    };
  },
31 Oct
2 weeks ago

partabsaifzakir started a new conversation How To Populate Form Depend On The DropDown Selection ?

I'm using Laravel 5.7 & VueJs 2.5.* ...

I want to autofill my form, i have tables called, vt_invoice (vendor ticket invoice) and vt_invoice_items (vendor ticket invoice items). and i have another tables called ct_invoice (customer ticket invoice) and ct_invoice_items (customer ticket invoice items). i want that when i create ct_invoice my form should auto fill on a DropDown list of Unique Column of vt_invoice_number, with the data stored in vt_invoice and vt_invoice_items tables.

I play around but didn't succeed.

Here is My DropDown list of vt_invoice_number:

    <!-- =====VENDOR INVOICE SELECTION===== -->
    <div class="col-sm-2">
      <div class="form-group">
        <label for="ticket_invoice_no">Select Vendor Invoice</label>
        <select id="ticket_invoice_no" name="ticket_invoice_no" type="text" class="form-control">
          <option v-for="ticketInvoice in ticketInvoices" :key="ticketInvoice.id" :value="ticketInvoice.id">{{ ticketInvoice.ticket_invoice_no }}</option>
        </select>
      </div>
    </div>

My ct_invoice and ct_invoice_items fields:

    <form @submit.prevent="editmode ? updateCtInvoice() : createCtInvoice()">

      <!-- =====CUSTOMER TICKET INVOICE FIELDS===== -->

      <!-- Customer Ticket Invoice Number -->
      <div class="form-group">
        <label for="ct_invoice_no" class="control-label">Invoice No.</label>
        <input v-model="form.ct_invoice_no" type="text" name="ct_invoice_no" class="form-control">
      </div>

      <!-- =====CUSTOMER TICKET INVOICE FIELDS===== -->
      <tbody>
        <tr v-for="(ctInvoiceItem, key) in form.ctInvoiceItems" :key="key">

          <!--Passenger Name-->
          <td>
            <input v-model.number="ctInvoiceItem.ct_passenger_name" size="40" type="text" name="ct_passenger_name" class="table-control form-control">
          </td>

          <!--AND OTHER FIELDS DOWN BELOW-->
        </tr>
    </form>

Just for the info, if i could use the same approach. When i want to edit my ct_invoice i use this method, and a Modal open, filled with ct_invoice and ct_invoice_items data.:

    editModel(ctInvoice) {
      this.editmode = true;
      this.form.reset();
      this.form.clear();
      $("#addNewCtInvoice").modal("show");

      this.form.fill(ctInvoice);
      this.form.ctInvoiceItems = ctInvoice.ct_invoice_items;
    },

Image for better understanding: enter image description here

29 Oct
3 weeks ago

partabsaifzakir left a reply on I Need To Edit My Invoice But How To Fill Invoice Items In It

@Borisu Yeah i know, You showed the right path but i didn't no how to walk through it.....

partabsaifzakir left a reply on I Need To Edit My Invoice But How To Fill Invoice Items In It

@Borisu

My issue is solved, in my edit mode i add this line:

    /*==============EDIT INVOICE CODE==============*/
    editModel(ticketInvoice) {
      this.editmode = true;
      this.form.reset();
      this.form.clear();
      $("#addNewTicketInvoice").modal("show");
      this.form.fill(ticketInvoice);

      this.form.ticketInvoiceItems=ticketInvoice.ticket_invoice_items;
    },
    /*==============END EDIT INVOICE CODE==============*/

partabsaifzakir left a reply on Why Can't I See My GrandTotal In My View?

@D9705996 i did a typing mistake.....

When i see my Vue Dev Tool, I see This:

ctInvoices: Array[20] 0: Object created_at: "2018-10-27 15:13:06"
ct_Invoice_date: "2018-10-31"
ct_Invoice_fares_total: "600.00"
ct_Invoice_grand_total: "1000.00"
ct_Invoice_grand_total_words: null ct_Invoice_taxes_grand_total: "400.00"
ct_Invoice_terms: null ct_invoice_items: Array1 ct_invoice_no: "111-222-333"
customer: Object customer_id: 3 id: 22 updated_at: "2018-10-27 15:13:06"

And i was doing:

<td>{{ formatPrice(ctInvoice.ct_invoice_grand_total) }}</td>

Instead of ct_Invoice_grand_total, i was writing ct_invoice_grand_total.

Thanks For Your Support....

28 Oct
3 weeks ago

partabsaifzakir left a reply on Why Can't I See My GrandTotal In My View?

@D9705996 would you also suggest me how to deal with nested data and key, in a simple way, so i can understand what to do.... Please

partabsaifzakir left a reply on Why Can't I See My GrandTotal In My View?

@D9705996 No! If i remove my formatPrice it do not show NaN, it just show blank.

partabsaifzakir left a reply on Why Can't I See My GrandTotal In My View?

No! If i remove my formatPrice it do not show NaN, it just show blank.

partabsaifzakir left a reply on Why Can't I See My GrandTotal In My View?

@D9705996

Now it's displaying $0.00 in all my GrandTotal.

I'm using the same method in ticketInvoices and it's working perfectly their, Look at This:

Where i'm displaying GrandTotal for ticketInvoice:

    <tr v-for="ticketInvoice in ticketInvoices" :key="ticketInvoice.id">
      <td>{{ formatPrice(ticketInvoice.ticket_invoice_grand_total) }}</td>
    </tr>

My ticketInvoices VueJs data():

data() {
    return {
      editmode: true,
      ticketInvoices: {},
      vendors: null,
      form: new Form({
        id: "",
        vendor_id: "",
        ticket_invoice_no: "",
        ticket_invoice_date: "",
        ticket_invoice_fares_total: 0,
        ticket_invoice_taxes_grand_total: 0,
        ticket_invoice_grand_total: 0,

        ticketInvoiceItems: [{
          id: "",
          ticket_invoice_id: "",
          passenger_name: "",
          fares: 0,
          total_tax_breakup: 0,
          sub_total: 0
        }]
      })
    }

Format Amount with this method() in ticketInvoices:

    formatPrice(value) {
      let val = (value / 1).toFixed().replace(".", ".");
      return val.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); //75.674,00
    },

partabsaifzakir started a new conversation Why Can't I See My GrandTotal In My View?

I'm using Laravel 5.7 & VueJs 2.5.* ...

I want to display GrandTotal on my view table, but i don't know what i'm doing wrong.

Where i'm displaying GrandTotal:

    <tr v-for="ctInvoice in ctInvoices" :key="ctInvoice.id">
      <td>{{ formatPrice(ctInvoice.ct_invoice_grand_total) }}</td>
    </tr>

My VueJs data():

    data() {
        return {
          ctInvoices: {},
          customers: null,
          form: new Form({
            id: "",
            customer_id: "",
            ct_invoice_no: "",
            ct_invoice_date: "",
            ct_invoice_fares_total: 0,
            ct_invoice_taxes_grand_total: 0,
            ct_invoice_grand_total: 0,
            
            ctInvoiceItems: [{
              id: "",
              ct_invoice_id: "",
              ct_passenger_name: "",
              ct_fares: 0,
              ct_total_tax_breakup: 0,
              ct_sub_total: 0
            }]
          })
        };

Format Amount with this method():

    formatPrice(value) {
      let val = (value / 1).toFixed().replace(".", ".");
      return val.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); //75.674,00
    },
27 Oct
3 weeks ago

partabsaifzakir left a reply on I Need To Edit My Invoice But How To Fill Invoice Items In It

@Borisu

Do i need to make relation between vendor & ticketInvoiceItems, like a vendor hasMany ticketInvoiceItems, and a ticketInvoiceItems belongsTo a vendor.