Subversion Repositories SmartDukaan

Rev

Rev 28055 | Rev 31738 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<style>
.modal-content {
        background: white;
}

.modelHeaderCustom {
        font-size: 14px;
        font-weight: bold;
}

.border-highlight {
        border: 3px solid red;
}

hr {
        background-color: #dddddd;
        border: none;
        height: 1px;
        background: #dddddd;
}

.control-label {
        margin-top: 0;
        margin-bottom: 0;
        padding-top: 7px;
        font-weight: bold;
        font-size: 14px;
}

.right {
        float: right;
}

.form-control {
        color: black;
}

.bold-details {
        text-transform: capitalize;
        font-weight: 600;
        color: #212121;
}

.normal-details {
        font-weight: 400;
        text-transform: capitalize;
        color: #797979;
}
}
</style>
#set($options="{ weekday: 'long', year: 'numeric', month: 'long', day:
'numeric', hour: 'numeric', minute:'numeric' }")
<section class="wrapper">
        <div class="row" style="background: white; font-size: 14px;">
                <div class="col-lg-4" style="border-left: 1px solid #f0f0f0;">
                        <h4>ORDER DETAILS</h4>
                        <div class="row">
                                <div class="col-lg-4">
                                        <p class="bold-details">Order ID</p>
                                </div>
                                <div class="col-lg-6">
                                        <p class="normal-details">#$fofoOrder.getId()
                                                ($fofoOrderItems.size() item)</p>
                                </div>
                        </div>
                        <div class="row">
                                <div class="col-lg-4">
                                        <p class="bold-details">Order Date</p>
                                </div>
                                <div class="col-lg-6">
                                        <script>
                                                document.getElementById('createTimestamp').appendChild(
                                                                document.createTextNode(new Date(
                                                                                '$fofoOrder.getCreateTimestamp()')
                                                                                .toLocaleString("en-US", $options)))
                                        </script>
                                        <p class="normal-details" id="createTimestamp"></p>
                                </div>
                        </div>
                        <div class="row">
                                <div class="col-lg-4">
                                        <p class="bold-details">Amount Paid</p>
                                </div>
                                <div class="col-lg-6">
                                        <p class="normal-details">
                                                <span class="normal-details">&#8377; </span>$fofoOrder.getTotalAmount()
                                        </p>
                                </div>
                        </div>
                </div>

                <form id="update-order-customer-details-form">
                        <div class="col-lg-4" style="border-left: 1px solid #f0f0f0;">
                                <h4>BILLING DETAILS</h4>
                                <div class="row">
                                        <div class="col-lg-4">
                                                <p class="bold-details">Email Id</p>
                                        </div>
                                        <div class="col-lg-6">
                                                <input class="form-control input-sm" type="text" name="emailId"
                                                        placeholder="Email Id" value="$customer.getEmailId()">
                                        </div>
                                </div>
                                <br>
                                <div class="row">
                                        <div class="col-lg-4">
                                                <p class="bold-details">Mobile Number</p>
                                        </div>
                                        <div class="col-lg-6">
                                                <input class="form-control input-sm" type="text"
                                                        name="mobileNumber" placeholder="Mobile Number"
                                                        value="$customer.getMobileNumber()">
                                        </div>
                                </div>
                                <div class="row">
                                        <div class="col-lg-4">
                                                <p class="bold-details">First Name</p>
                                        </div>
                                        <div class="col-lg-6 form-group">
                                                <input class="form-control input-sm" type="text" name="firstName"
                                                        placeholder="First Name" value="$customer.getFirstName()">
                                        </div>
                                </div>
                                <div class="row">
                                        <div class="col-lg-4">
                                                <p class="bold-details">Last Name</p>
                                        </div>
                                        <div class="col-lg-6 form-group">
                                                <input class="form-control input-sm" type="text" name="lastName"
                                                        placeholder="Last Name" value="$customer.getLastName()">
                                        </div>
                                </div>

                                <div class="row">
                                        <div class="col-lg-4">
                                                <p class="bold-details">Line 1</p>
                                        </div>
                                        <div class="col-lg-6 form-group">
                                                <input class="form-control input-sm" type="text" name="line1"
                                                        placeholder="Line 1" value="$customerAddress.getLine1()">
                                        </div>
                                </div>
                                <div class="row">
                                        <div class="col-lg-4">
                                                <p class="bold-details">Line 2</p>
                                        </div>
                                        <div class="col-lg-6 form-group">
                                                <input class="form-control input-sm" type="text" name="line2"
                                                        placeholder="Line 2" value="$customerAddress.getLine2()">
                                        </div>
                                </div>
                                <div class="row">
                                        <div class="col-lg-4">
                                                <p class="bold-details">Landmark</p>
                                        </div>
                                        <div class="col-lg-6 form-group">
                                                <input class="form-control input-sm" type="text" name="landmark"
                                                        placeholder="Landmark" value="$customerAddress.getLandmark()">
                                        </div>
                                </div>
                                <div class="row">
                                        <div class="col-lg-4">
                                                <p class="bold-details">City</p>
                                        </div>
                                        <div class="col-lg-6 form-group">
                                                <input class="form-control input-sm" type="text" name="city"
                                                        placeholder="city" value="$customerAddress.getCity()">
                                        </div>
                                </div>
                                <div class="row">
                                        <div class="col-lg-4">
                                                <p class="bold-details">Pin Code</p>
                                        </div>
                                        <div class="col-lg-6 form-group">
                                                <input class="form-control input-sm" type="text" name="pinCode"
                                                        placeholder="Pin Code" value="$customerAddress.getPinCode()">
                                        </div>
                                </div>
                                <div class="row">
                                        <div class="col-lg-4">
                                                <p class="bold-details">State</p>
                                        </div>
                                        <div class="col-lg-6 form-group">
                                                <select class="form-control input-sm" id="state" name="state"
                                                        placeholder="State">
                                                        <option value="" disabled selected>State</option>
                                                        #foreach($stateName in $stateNames)
                                                        #if($customerAddress.getState() == $stateName)
                                                        <option value="$stateName" selected>$stateName</option> #else
                                                        <option value="$stateName">$stateName</option> #end #end
                                                </select>
                                        </div>
                                </div>
                                <div class="row">
                                        #if($fofoOrder.getCustomerGstNumber())
                                        <div class="col-lg-4">
                                                <p class="bold-details">GST Number</p>
                                        </div>
                                        <div class="col-lg-6 form-group">
                                                <input class="form-control input-sm" type="text" name="gstNumber"
                                                        placeholder="GST Number"
                                                        value="$fofoOrder.getCustomerGstNumber()">
                                        </div>
                                        #else
                                        <div class="col-lg-4">
                                                <p class="bold-details">GST Number</p>
                                        </div>
                                        <div class="col-lg-6 form-group">
                                                <input class="form-control input-sm" type="text" name="gstNumber"
                                                        placeholder="GST Number" value=""> #end
                                        </div>
                                        <div class="row">
                                                <div class="col-md-2 col-md-offset-3">
                                                        <button id="updateCustomerDetails" class="btn btn-primary"
                                                                type="submit">Update Details</button>
                                                </div>
                                        </div>
                                </div>
                </form>
                <div class="col-lg-4" style="border-left: 1px solid #f0f0f0;">
                        <h4>INVOICE DETAILS</h4>
                        <p class="bold-details">
                                Invoice Number <span class="normal-details extra-margin">$fofoOrder.getInvoiceNumber()</span>
                        </p>
                        <p class="invoice_download_option">
                                <i class="fa fa-print" aria-hidden="true"></i> <a target="_blank"
                                        href="generateInvoice/?orderId=$fofoOrder.getId()"
                                        class="extra-margin" style="font-size: 18px">Print Invoice</a></i>
                        </p>
                </div>

        </div>
        <br>
        <div class="row" style="font-size: 14px; color: #688a7e;">
                <div class="col-lg-12">
                        <table class="table table-striped table-advance table-hover"
                                id="fofo-item-table">
                                <tbody>
                                        <tr>
                                                <th>Item Code</th>
                                                <th>Description</th>
                                                <th>MOP</th>
                                                <th>Unit Price</th>
                                                <th>Quantity</th>
                                                <th>Total Price</th>
                                                <th>Actions</th>
                                        </tr>
                                        <script type="text/javascript">
                                                fofoLineItemsMap = $fofoOrderItemIdLineItemsMap;
                                                foiIdCustomerReturnInventoryItemsMap = $foiIdCustomerReturnInventoryItemsMap;
                                                inventoryItemBilledQtyMap = $inventoryItemBilledQtyMap;
                                        </script>
                                        #foreach( $fofoOrderItem in $fofoOrderItems ) #set ($total =
                                        $fofoOrderItem.getSellingPrice() * $fofoOrderItem.getQuantity())
                                        <tr>
                                                <td>$fofoOrderItem.getItemId()</td>
                                                <td>$fofoOrderItem.getBrand() $fofoOrderItem.getModelName()
                                                        $fofoOrderItem.getModelNumber() $fofoOrderItem.getColor()</td>
                                                <td>$fofoOrderItem.getMop()</td> #if($insurancePolicies.isEmpty())
                                                <td>$fofoOrderItem.getSellingPrice() <input type="hidden"
                                                        style="color: black" value="$fofoOrderItem.getId()" /> <input
                                                        type="number" style="color: black" class="fofoLineItemAmount"
                                                        name="itemamount" value="$fofoOrderItem.getSellingPrice()" /> <a
                                                        class="pointer" id="editamountbutton" style="padding: 12px">Edit</a>
                                                </td> #else
                                                <td>$fofoOrderItem.getSellingPrice()</td> #end
                                                <td>$fofoOrderItem.getQuantity()</td>
                                                <td>$total</td> #set ($item =
                                                $itemsMap.get($fofoOrderItem.getItemId()))
                                                #if($item.getCategoryId()==10006) #if($fofoOrderItem.isDoa())
                                                <td><a class="pointer" data-foi="$fofoOrderItem.getId()"
                                                        data-itemdesc="$item.getItemDescription()"
                                                        data-target=".bs-example-modal-sm" data-toggle="modal">Mark
                                                                DOA</a></td> #else
                                                <td></td> #end #else #if($markDefective)
                                                <td><a class="pointer" data-foi="$fofoOrderItem.getId()"
                                                        data-itemdesc="$item.getItemDescription()"
                                                        data-target=".bs-example-modal-sm" data-toggle="modal">Mark
                                                                Defective</a></td> #else
                                                <td></td> #end #end
                                        </tr>
                                        #end
                                </tbody>
                        </table>
                </div>
                <!-- Small modal -->
                <div class="modal fade bs-example-modal-sm" tabindex="-1"
                        role="dialog" aria-labelledby="mySmallModalLabel" id="exampleModal">
                        <div class="modal-dialog modal-md" role="document">
                                <div class="modal-content">
                                        <div class="modal-header">
                                                <p class="modal-title"></p>
                                        </div>
                                        <div class="modal-body"></div>
                                        <div class="modal-footer">
                                                <button type="button" class="return-submit btn btn-primary">Submit</button>
                                        </div>
                                </div>
                        </div>
                </div>
        </div>

        <div class="row">
                #if(!$insurancePolicies.isEmpty())
                        <div class="col-lg-8">
                                <h4>INSURANCE DETAILS</h4>
                                <table class="table table-striped table-advance">
                                        <tbody>
                                        <tr>
                                                <th>Plan Name</th>
                                                <th>Device Name</th>
                                                <th>Serial Number</th>
                                                <th>Provider Name</th>
                                                <th>Amount</th>
                                        </tr>
                                                #if(!$insurancePolicies.isEmpty()) #foreach( $insurancePolicy in
                                                        $insurancePolicies )
                                                <tr>
                                                        <td>$insurancePolicy.getPolicyPlan()</td>
                                                        <td>$insurancePolicy.getBrand() $insurancePolicy.getModelName()</td>
                                                        <td>$insurancePolicy.getSerialNumber()</td>
                                                        <td>$insurancePolicy.getInsuranceProvider().getName()</td>
                                                        <td>$insurancePolicy.getSaleAmount()</td>
                                                </tr>
                                                #end #end
                                </tbody>
                        </table>
                </div>
                #end

                <div class="col-lg-4 right"
                        style="border-left: 1px solid #f0f0f0; background: white; font-size: 14px;">
                        <h4>PAYMENT DETAILS</h4>

                        #foreach( $fofoPartnerPaymentOption in $fofoPartnerPaymentOptions )
                        #set($paymentOption =
                        $paymentOptionIdPaymentOptionMap.get($fofoPartnerPaymentOption))
                        <div class="row">
                                <div class="col-lg-3">
                                        <p class="bold-details">$paymentOption.getName()</p>
                                </div>
                                <div class="col-lg-3">
                                        <div class="paymentOptions">
                                                #if($paymentOptionIdPaymentOptionTransactionMap.get($fofoPartnerPaymentOption))
                                                <input data-payment-option-id="$fofoPartnerPaymentOption"
                                                        type="number" class="normal-details"
                                                        value="$paymentOptionIdPaymentOptionTransactionMap.get($fofoPartnerPaymentOption).getAmount()"
                                                        style="width: 100px;" /> #else <input
                                                        data-payment-option-id="$fofoPartnerPaymentOption" type="number"
                                                        class="normal-details" value="0" style="width: 100px;" /> #end
                                        </div>
                                </div>
                        </div>
                        #end #if($insurancePolicies.isEmpty())
                        <div class="col-md-2 col-md-offset-3">
                                <button class="btn btn-primary  updatePaymentDetails"
                                        data-totalamount="$fofoOrder.getTotalAmount()"
                                        data-invoicenumber="$fofoOrder.getInvoiceNumber()"
                                        data-fofoid="$fofoOrder.getFofoId()"
                                        data-orderid="$fofoOrder.getId()"
                                        data-totalnumberofpaymentoptionid="$totalNumberOfPaymentOptionId"
                                        data-createddatetime="$fofoOrder.getCreateTimestamp()"
                                        type="submit">Update</button>
                        </div>
                        #else
                        <div class="col-md-2 col-md-offset-3">
                                <button class="btn btn-primary  updatePaymentDetails"
                                        data-totalamount="$fofoOrder.getTotalAmount()"
                                        data-invoicenumber="$fofoOrder.getInvoiceNumber()"
                                        data-fofoid="$fofoOrder.getFofoId()"
                                        data-orderid="$fofoOrder.getId()"
                                        data-totalnumberofpaymentoptionid="$totalNumberOfPaymentOptionId"
                                        data-createddatetime="$fofoOrder.getCreateTimestamp()"
                                        type="submit" disabled>Update</button>
                        </div>
                        #end<br>
                        <hr />
                        <div class="row">
                                <div class="col-lg-3">
                                        <p class="bold-details">TOTAL</p>
                                </div>
                                <div class="col-lg-3">
                                        <p class="nomal-details" id="totalAmount">$fofoOrder.getTotalAmount()
                                        </p>
                                </div>
                        </div>
                </div>
        </div>

</section>
<script type="text/javascript"
        src="resources/js/customer-return.js?v=${version}"></script>
<script type="text/javascript"
        src="resources/js/update-order-customer-details.js?v=${version}"></script>