agregados campos a los datos fiscales
This commit is contained in:
parent
020bb38873
commit
90cb8a146b
|
@ -14,10 +14,11 @@
|
|||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-textfield vn-one label="Código postal" field="fiscal.client.postcode"></vn-textfield>
|
||||
<vn-combo vn-one label="Provincia" field="fiscal.client.province"></vn-combo>
|
||||
<vn-combo vn-one label="Provincia" field="fiscal.client.province">
|
||||
<option ng-repeat="p in fiscal.provinces" value="{{p.id}}">{{p.name}}</option>
|
||||
</vn-combo>
|
||||
<vn-combo vn-one label="País" field="fiscal.client.country">
|
||||
<option value="1">Spain</option>
|
||||
<option value="2">Holland</option>
|
||||
<option ng-repeat="c in fiscal.countries" value="{{c.id}}">{{c.name}}</option>
|
||||
</vn-combo>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
|
@ -31,7 +32,9 @@
|
|||
<vn-vertical pad-large>
|
||||
<vn-title>Información de facturación</vn-title>
|
||||
<vn-horizontal>
|
||||
<vn-combo vn-two label="Forma de pago" field="fiscal.client.payMethod"></vn-combo>
|
||||
<vn-combo vn-two label="Forma de pago" field="fiscal.client.payMethod">
|
||||
<option ng-repeat="p in fiscal.payments" value="{{p.id}}">{{p.name}}</option>
|
||||
</vn-combo>
|
||||
<vn-textfield vn-one label="Vencimiento" field="fiscal.client.dueDay"></vn-textfield>
|
||||
<vn-check vn-three label="Recargo de equivalencia" field="fiscal.client.surcharge"></vn-check>
|
||||
</vn-horizontal>
|
||||
|
|
|
@ -9,6 +9,21 @@ export const COMPONENT = {
|
|||
client: '<'
|
||||
},
|
||||
controller: function($http) {
|
||||
$http.get('/client/api/Countries').then(
|
||||
json => this.countries = json.data,
|
||||
json => console.error(json.data.error.message)
|
||||
);
|
||||
|
||||
$http.get('/client/api/Provinces').then(
|
||||
json => this.provinces = json.data,
|
||||
json => console.error(json.data.error.message)
|
||||
);
|
||||
|
||||
$http.get('/client/api/PaymentMethods').then(
|
||||
json => this.payments = json.data,
|
||||
json => console.error(json.data.error.message)
|
||||
);
|
||||
|
||||
this.submit = function() {
|
||||
$http.put('/client/api/Clients', this.client).then(
|
||||
json => console.log(json.statusText),
|
||||
|
|
2
db.json
2
db.json
|
@ -18,7 +18,7 @@
|
|||
"NUf7o684TmteojFX9KmPOpaDLthjP5Def4wuy83Yjv31i43HHiWgV3FyBp6pX8Ue": "{\"id\":\"NUf7o684TmteojFX9KmPOpaDLthjP5Def4wuy83Yjv31i43HHiWgV3FyBp6pX8Ue\",\"ttl\":1209600,\"created\":\"2016-11-21T11:06:11.113Z\",\"userId\":1}"
|
||||
},
|
||||
"Client": {
|
||||
"12": "{\"name\":\"Verdnatura\",\"id\":12,\"fi\":\"B97367486\",\"salesPerson\":\"1\",\"telefono\":\"963242100\",\"socialName\":\"Verdnatura Levante SL\",\"active\":true,\"user\":\"verdnatura\",\"fax\":\"963242100\",\"phone\":\"963242100\",\"email\":\"informatica@verdnatura.es\",\"surcharge\":true,\"cyc\":2345,\"credit\":1000,\"iban\":\"2352345234523452345\",\"street\":\"Avenida Espioca, 100\",\"city\":\"Silla\",\"postcode\":\"46680\",\"mobile\":\"654654654\",\"dueDay\":4,\"gestdoc\":23452343}",
|
||||
"12": "{\"name\":\"Verdnatura\",\"id\":12,\"fi\":\"B97367486\",\"salesPerson\":\"1\",\"telefono\":\"963242100\",\"socialName\":\"Verdnatura Levante SL\",\"active\":true,\"user\":\"verdnatura\",\"fax\":\"963242100\",\"phone\":\"963242100\",\"email\":\"informatica@verdnatura.es\",\"surcharge\":true,\"cyc\":2345,\"credit\":1000,\"iban\":\"2352345234523452345\",\"street\":\"Avenida Espioca, 100\",\"city\":\"Silla\",\"postcode\":\"46680\",\"mobile\":\"654654654\",\"dueDay\":4,\"gestdoc\":23452343,\"payMethod\":\"1\",\"province\":1,\"country\":\"1\"}",
|
||||
"14": "{\"name\":\"Cliente 1\",\"id\":14,\"street\":\"Aaaaaaaaaa\",\"fi\":\"1234567890A\",\"socialName\":\"Cliente 1\",\"fax\":\"963242100\",\"dischargeDate\":\"01/01/2017\",\"telefono\":\"963242100\",\"salesPerson\":\"2\",\"email\":\"informatica@verdnatura.es\",\"city\":\"asdf\",\"postcode\":\"asdf\",\"phone\":\"asdf\",\"mobile\":\"asdf\",\"credit\":2345,\"cyc\":123,\"iban\":\"asdf\",\"dueDay\":345,\"gestdoc\":2435,\"surcharge\":true}"
|
||||
},
|
||||
"PaymentMethod": {
|
||||
|
|
|
@ -94,6 +94,16 @@
|
|||
"type": "belongsTo",
|
||||
"model": "PaymentMethod",
|
||||
"foreingKey": "payId"
|
||||
},
|
||||
"country":{
|
||||
"type": "belongsTo",
|
||||
"model": "Country",
|
||||
"foreignKey": "countryId"
|
||||
},
|
||||
"province":{
|
||||
"type": "belongsTo",
|
||||
"model": "Province",
|
||||
"foreignKey": "provinceId"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue