<commit_before>{% extends "AchPoManagerBundle:PoManager:layout.html.twig" %}

{% block title %}{{ parent() }} - Update RMA (repair process){% endblock %}

{% block body %}

{% form_theme form 'AchPoManagerBundle:PoManager:_field-prototype-Rma.html.twig' %} 

  <div class="alert alert-info" role="alert">
    {% if rmaInstance.serialNum.shipmentBatch.ShipmentItem.Shipment.shippingDate is not null %}
      <h4>This unit was originally shipped to customer on {{ rmaInstance.serialNum.shipmentBatch.ShipmentItem.Shipment.shippingDate|date('M d, Y' )}} under PO #{{ rmaInstance.serialNum.shipmentBatch.ShipmentItem.PoItem.Po.num}}:
	{% if rmaInstance.serialNum.shipmentBatch.ShipmentItem.Shipment.shippingDate|date_modify('+1 year')|date('Y-m-d') > rmaInstance.creationDate|date('Y-m-d') %}
	  <b>Unit is returned under warranty.</b>
	{% else %}
	  <b>Unit is returned out of warranty.</b>
	{% endif %}
      </h4>
    {% else %}
      <h4>This unit was shipped under PO #{{ rmaInstance.serialNum.shipmentBatch.ShipmentItem.PoItem.Po.num}}, however shipment date is unkown: <b>warranty status cannot be determined</b></h4>
    {% endif %}
    {% if rmaInstance.custFilePath is not null %}
      <a class="btn btn-primary btn-large" href="{{ rma_files_path }}/{{rmaInstance.custFilePath}}" target="_blank">See customer document</a>
    {% endif %}
  </div>

  
  <h2>Update Rma with Repair Information</h2>
  
  <div class="well">
    <form class="form-horizontal" method="post" {{ form_enctype(form) }}>
      <div class="form-group">
	<div class="row">
	  <div class="col-lg-2">
	    {{ form_label(form.serialNumF, "Serial Number", {'attr': {'class': 'control-label'}}) }}
	  </div>
	  <div class="col-lg-2">
	    {{ form_label(form.contactEmail, "Customer Contact Email", {'attr': {'class': 'control-label'}}) }}
	  </div>
	  <div class="col-lg-2">
	    {{ form_label(form.creationDate, "RMA opened on", {'attr': {'class': 'control-label'}}) }}
	  </div>
	  <div class="col-lg-2">
	    {{ form_label(form.receptionDate, "RMA received on", {'attr': {'class': 'control-label'}}) }}
	  </div>
	  <div class="col-lg-2"> 
	    {{ form_label(form.custSerialNum, "Customer S/N if any", {'attr': {'class': 'control-label'}}) }} 
	  </div> 
	</div>
	<div class="row">
	  <div class="col-lg-2">
	    {{ form_errors(form.serialNumF) }}
	    {{ form_widget(form.serialNumF, {'attr': {'class': 'form-control'} } ) }}
	  </div>
	  <div class="col-lg-2">
	    {{ form_errors(form.contactEmail) }}
	    {{ form_widget(form.contactEmail, {'attr': {'class': 'form-control'} } ) }}
	  </div>
	  <div class="col-lg-2"> 
	    {{ form_errors(form.creationDate) }} 
	    {{ form_widget(form.creationDate, {'attr': {'class': 'form-control'} } ) }} 
	  </div>
	  <div class="col-lg-2"> 
	    {{ form_errors(form.receptionDate) }} 
	    {{ form_widget(form.receptionDate, {'attr': {'class': 'form-control'} } ) }} 
	  </div>

	  <div class="col-lg-2"> 
	    {{ form_errors(form.custSerialNum) }} 
	    {{ form_widget(form.custSerialNum, {'attr': {'class': 'form-control'} } ) }} 
	  </div> 
	</div>
      </div>
      <div>
	<div class="form-group">
	  <div class="row">
	    <div class="col-lg-2 col-lg-offset-1">
	      {{ form_label(form.problemDescription, "Failure Description", {'attr': {'class': 'control-label'} }) }} 
	    </div>
	  </div>
	  <div class="row">
	    <div class="col-lg-6 col-lg-offset-1">
	      {{ form_errors(form.problemDescription) }} 
	      {{ form_widget(form.problemDescription, {'attr': {'class': 'form-control', 'placeholder': 'Please provide a short and precise description of issue customer is experiencing '} } ) }} 
	    </div>
	  </div>
	</div>
      </div>
      <div class="form-group">
	<div class="row">
	</div>
	<div class="row">
	  <div class="col-lg-8 col-lg-offset-1">
	    {{ form_label(form.investigationResult, "Result of Investigation *", {'attr': {'class': 'control-label'}}) }} 
	  </div>
	</div>
	<div class="row">
	  <div class="col-lg-8 col-lg-offset-1">
	    {{ form_errors(form.investigationResult) }} 
	    {{ form_widget(form.investigationResult, {'attr': {'class': 'form-control'} } ) }} 
	  </div>
	</div>
	<br />
	<div class="row">
	  <div class="col-lg-4 col-lg-offset-1">
	    {{ form_label(form.comment, "Comment", {'attr': {'class': 'control-label'}}) }} 
	  </div>
	  <div class="col-lg-2 col-lg-offset-1">
	    {{ form_label(form.problemCategory, "Classify Problem *", {'attr': {'class': 'control-label'}} ) }}
	  </div>
	</div>
	<div class="row">
	  <div class="col-lg-4 col-lg-offset-1">
	    {{ form_errors(form.comment) }} 
	    {{ form_widget(form.comment, {'attr': {'class': 'form-control'} } ) }} 
	  </div>
	  <div class="col-lg-3 col-lg-offset-1">
	    {{ form_errors(form.problemCategory) }} 
	    {{ form_widget(form.problemCategory, {'attr': {'class': 'form-control'} } ) }} 
	  </div>
	</div>
      </div>
	<br />
	<div id="number_replacement">
      {{ form_label(form.partReplacements, "%s part swap(s) have been made during repair:"|format( form.partReplacements|length )) }}
	</div><commit_msg>add link to spare part list from RMA repair update page<commit_after>{% extends "AchPoManagerBundle:PoManager:layout.html.twig" %}

{% block title %}{{ parent() }} - Update RMA (repair process){% endblock %}

{% block body %}

{% form_theme form 'AchPoManagerBundle:PoManager:_field-prototype-Rma.html.twig' %} 

  <div class="alert alert-info" role="alert">
    {% if rmaInstance.serialNum.shipmentBatch.ShipmentItem.Shipment.shippingDate is not null %}
      <h4>This unit was originally shipped to customer on {{ rmaInstance.serialNum.shipmentBatch.ShipmentItem.Shipment.shippingDate|date('M d, Y' )}} under PO #{{ rmaInstance.serialNum.shipmentBatch.ShipmentItem.PoItem.Po.num}}:
	{% if rmaInstance.serialNum.shipmentBatch.ShipmentItem.Shipment.shippingDate|date_modify('+1 year')|date('Y-m-d') > rmaInstance.creationDate|date('Y-m-d') %}
	  <b>Unit is returned under warranty.</b>
	{% else %}
	  <b>Unit is returned out of warranty.</b>
	{% endif %}
      </h4>
    {% else %}
      <h4>This unit was shipped under PO #{{ rmaInstance.serialNum.shipmentBatch.ShipmentItem.PoItem.Po.num}}, however shipment date is unkown: <b>warranty status cannot be determined</b></h4>
    {% endif %}
    {% if rmaInstance.custFilePath is not null %}
      <a class="btn btn-primary btn-large" href="{{ rma_files_path }}/{{rmaInstance.custFilePath}}" target="_blank">See customer document</a>
    {% endif %}
  </div>

  
  <h2>Update Rma with Repair Information</h2>
  
  <div class="well">
    <form class="form-horizontal" method="post" {{ form_enctype(form) }}>
      <div class="form-group">
	<div class="row">
	  <div class="col-lg-2">
	    {{ form_label(form.serialNumF, "Serial Number", {'attr': {'class': 'control-label'}}) }}
	  </div>
	  <div class="col-lg-2">
	    {{ form_label(form.contactEmail, "Customer Contact Email", {'attr': {'class': 'control-label'}}) }}
	  </div>
	  <div class="col-lg-2">
	    {{ form_label(form.creationDate, "RMA opened on", {'attr': {'class': 'control-label'}}) }}
	  </div>
	  <div class="col-lg-2">
	    {{ form_label(form.receptionDate, "RMA received on", {'attr': {'class': 'control-label'}}) }}
	  </div>
	  <div class="col-lg-2"> 
	    {{ form_label(form.custSerialNum, "Customer S/N if any", {'attr': {'class': 'control-label'}}) }} 
	  </div> 
	</div>
	<div class="row">
	  <div class="col-lg-2">
	    {{ form_errors(form.serialNumF) }}
	    {{ form_widget(form.serialNumF, {'attr': {'class': 'form-control'} } ) }}
	  </div>
	  <div class="col-lg-2">
	    {{ form_errors(form.contactEmail) }}
	    {{ form_widget(form.contactEmail, {'attr': {'class': 'form-control'} } ) }}
	  </div>
	  <div class="col-lg-2"> 
	    {{ form_errors(form.creationDate) }} 
	    {{ form_widget(form.creationDate, {'attr': {'class': 'form-control'} } ) }} 
	  </div>
	  <div class="col-lg-2"> 
	    {{ form_errors(form.receptionDate) }} 
	    {{ form_widget(form.receptionDate, {'attr': {'class': 'form-control'} } ) }} 
	  </div>

	  <div class="col-lg-2"> 
	    {{ form_errors(form.custSerialNum) }} 
	    {{ form_widget(form.custSerialNum, {'attr': {'class': 'form-control'} } ) }} 
	  </div> 
	</div>
      </div>
      <div>
	<div class="form-group">
	  <div class="row">
	    <div class="col-lg-2 col-lg-offset-1">
	      {{ form_label(form.problemDescription, "Failure Description", {'attr': {'class': 'control-label'} }) }} 
	    </div>
	  </div>
	  <div class="row">
	    <div class="col-lg-6 col-lg-offset-1">
	      {{ form_errors(form.problemDescription) }} 
	      {{ form_widget(form.problemDescription, {'attr': {'class': 'form-control', 'placeholder': 'Please provide a short and precise description of issue customer is experiencing '} } ) }} 
	    </div>
	  </div>
	</div>
      </div>
      <div class="form-group">
	<div class="row">
	</div>
	<div class="row">
	  <div class="col-lg-8 col-lg-offset-1">
	    {{ form_label(form.investigationResult, "Result of Investigation *", {'attr': {'class': 'control-label'}}) }} 
	  </div>
	</div>
	<div class="row">
	  <div class="col-lg-8 col-lg-offset-1">
	    {{ form_errors(form.investigationResult) }} 
	    {{ form_widget(form.investigationResult, {'attr': {'class': 'form-control'} } ) }} 
	  </div>
	</div>
	<br />
	<div class="row">
	  <div class="col-lg-4 col-lg-offset-1">
	    {{ form_label(form.comment, "Comment", {'attr': {'class': 'control-label'}}) }} 
	  </div>
	  <div class="col-lg-2 col-lg-offset-1">
	    {{ form_label(form.problemCategory, "Classify Problem *", {'attr': {'class': 'control-label'}} ) }}
	  </div>
	</div>
	<div class="row">
	  <div class="col-lg-4 col-lg-offset-1">
	    {{ form_errors(form.comment) }} 
	    {{ form_widget(form.comment, {'attr': {'class': 'form-control'} } ) }} 
	  </div>
	  <div class="col-lg-3 col-lg-offset-1">
	    {{ form_errors(form.problemCategory) }} 
	    {{ form_widget(form.problemCategory, {'attr': {'class': 'form-control'} } ) }} 
	  </div>
	</div>
      </div>
	<br />
	<div id="number_replacement">
      {{ form_label(form.partReplacements, "%s part swap(s) have been made during repair:"|format( form.partReplacements|length )) }}
	</div>
	<div class="col-lg-2">
	<a href="{{path('ach_po_manager_dump_spare_parts_product', { 'pn' : rmaInstance.serialNum.shipmentBatch.shipmentItem.poItem.revision.product.pn })}}" target="_blank">see detailed list of spare parts</a>
      </div>
{'fraction_non_alphanumeric': 0.20783219474646397, 'fraction_numerical': 0.00644664678148754, 'mean_word_length': 3.6946702800361337, 'pattern_counts': {'":': 0, '<': 175, '<?xml version=': 0, '>': 177, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7250773', 'n_tokens_mistral': 3888, 'n_tokens_neox': 3623, 'n_words': 696}