w

<!DOCTYPE html>
<html>
<head>
  <title>Delivery Note</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <style>
    /* CSS styles omitted for brevity */
  </style>
</head>
<body>
  <div class="container">
    <!-- Content omitted for brevity -->
  </div>
  <button class="print-button" onclick="saveDeliveryNote()">Save & Print</button>

  <script>
    function saveDeliveryNote() {
      // Get the form values
      var collectionOrderNumber = document.getElementById("collectionOrderNumber").value;
      var customerReference = document.getElementById("customerReference").value;
      var collectionReference = document.getElementById("collectionReference").value;
      var deliveryReference = document.getElementById("deliveryReference").value;
      var collectionDate = document.getElementById("collectionDate").value;
      var deliveryDate = document.getElementById("deliveryDate").value;
      var collectionAddress = document.getElementById("collectionAddress").value;
      var deliveryAddress = document.getElementById("deliveryAddress").value;
      var number = document.getElementById("number").value;
      var weight = document.getElementById("weight").value;
      var cuber = document.getElementById("cuber").value;
      var specialInstructions = document.getElementById("specialInstructions").value;
      var palletsGiven = document.getElementById("palletsGiven").value;
      var palletsReceived = document.getElementById("palletsReceived").value;

      // Create a data object with the form values
      var data = {
        collectionOrderNumber: collectionOrderNumber,
        customerReference: customerReference,
        collectionReference: collectionReference,
        deliveryReference: deliveryReference,
        collectionDate: collectionDate,
        deliveryDate: deliveryDate,
        collectionAddress: collectionAddress,
        deliveryAddress: deliveryAddress,
        number: number,
        weight: weight,
        cuber: cuber,
        specialInstructions: specialInstructions,
        palletsGiven: palletsGiven,
        palletsReceived: palletsReceived
      };

      // Send the data to the server-side script for saving
      fetch('/save_delivery_note.php', {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json'
        },
        body: JSON.stringify(data)
      })
      .then(function(response) {
        if (response.ok) {
          // If the response is successful, trigger the print function
          window.print();
        } else {
          // If the response is not successful, display an error message
          console.error('Error saving the delivery note.');
        }
      })
      .catch(function(error) {
        // Handle any errors that occur during the request
        console.error('Error saving the delivery note:', error);
      });
    }
  </script>
</body>
</html>
Delivery Note

COLLECTION / DELIVERY NOTE

LCL Logistics

Tel: 020 3375 0630

Email: ops@lcluk.com

Order Number Customer Reference Collection Reference Delivery Reference
Collection Date:     Delivery Date:    
Collection Address: Delivery Address:
Number Pkgs/ Plts:   Weight Kgs:   Volume M3:  
Special Instructions:

Signature:


Print Name:……………………………………………………………Date:…………………………………………Time:………………….

Received in good order, condition & agree to the below T & C’s

Pallets must be exchanged. If not, the delivery point will be charged

Pallets Given: Pallets Received:

Freight carried under RHA Conditions of Carriage. By signing this document, you have accepted the liability of any parking offences in the process of this delivery. No responsibility can be accepted for the condition or short delivery of goods unless notified in writing 2 days from the above date.