Merged in purchase-order (pull request #23)

Added PO field to event form #82
This commit is contained in:
Tom Price
2015-04-24 15:13:15 +01:00
4 changed files with 16 additions and 3 deletions

View File

@@ -116,4 +116,4 @@ class EventForm(forms.ModelForm):
fields = ['is_rig', 'name', 'venue', 'start_time', 'end_date', 'start_date',
'end_time', 'meet_at', 'access_at', 'description', 'notes', 'mic',
'person', 'organisation', 'dry_hire', 'checked_in_by', 'status',
'collector',]
'collector','purchase_order']

View File

@@ -255,8 +255,8 @@ class Event(models.Model, RevisionMixin):
# Monies
payment_method = models.CharField(max_length=255, blank=True, null=True)
payment_received = models.CharField(max_length=255, blank=True, null=True)
purchase_order = models.CharField(max_length=255, blank=True, null=True)
collector = models.CharField(max_length=255, blank=True, null=True, verbose_name='Collected By')
purchase_order = models.CharField(max_length=255, blank=True, null=True, verbose_name='PO')
collector = models.CharField(max_length=255, blank=True, null=True, verbose_name='Collected by')
# Calculated values
"""

View File

@@ -157,6 +157,11 @@
<dt>Collected By</dt>
<dd>{{ object.collector }}</dd>
{% endif %}
{% if event.is_rig %}
<dt>PO</dt>
<dd>{{ object.purchase_order }}</dd>
{% endif %}
</dl>
</div>
</div>

View File

@@ -387,6 +387,14 @@
{% render_field form.collector class+="form-control" %}
</div>
</div>
<div class="form-group">
<label for="{{ form.purchase_order.id_for_label }}"
class="col-sm-4 control-label">{{ form.purchase_order.label }}</label>
<div class="col-sm-8">
{% render_field form.purchase_order class+="form-control" %}
</div>
</div>
</div>
</div>
</div>