Announcement

Collapse
No announcement yet.

Automatic loading of data on Invoice

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Automatic loading of data on Invoice

    Dear team,
    When we create invoice, We can choose a contact from the list. if we select, it will automatically fillup datas in ( shipping address and billing address).
    Similarly i want to auto fillup data from contact to invoice field.

    Howits possible ?

  • #2
    Hi binshadme,

    Maybe this video instruction can be useful (requires some codding skills): https://www.youtube.com/watch?v=MdaJIGxOWpU.

    Comment


    • #3
      Please note that there are two relationships between contact and invoice (billingContact => Invoice (Billing) & shippingContact => Invoice (Shipping)) which means you need to create a custom contact detail view which inherits the existing contact detail view and just add your mapping to relatedAttributeMap. Also you will need to add both Invoice (Billing) & Invoice (Shipping) to your contact bottom relationships panel. Please see below an example (tested it and it works)

      Code:
      Espo.define('custom:views/contact/detail', 'crm:views/contact/detail', function (Dep) {
      
      return Dep.extend({
      
      relatedAttributeMap: {
      'invoicesBilling': {
      'addressStreet': 'billingAddressStreet',
      'addressCity': 'billingAddressCity',
      'addressState': 'billingAddressState',
      'addressPostalCode': 'billingAddressPostalCode',
      'addressCountry': 'billingAddressCountry'
      },
      'invoicesShipping': {
      'addressStreet': 'shippingAddressStreet',
      'addressCity': 'shippingAddressCity',
      'addressState': 'shippingAddressState',
      'addressPostalCode': 'shippingAddressPostalCode',
      'addressCountry': 'shippingAddressCountry'
      }
      }
      
      });
      });
      ​

      Comment

      Working...
      X